[sane-devel] Code-freeze for sane-1.0.9 active

Karl Heinz Kremer khk at khk.net
Sat Oct 19 14:34:49 BST 2002


On Sat, Oct 19, 2002 at 08:10:46AM -0400, Karl Heinz Kremer wrote:
> > > I did however get one error message while
> > > compiling dc25.c:
> > > 
> > > gcc -c -g -O2 -W -Wall -Wcast-align -Wcast-qual -Wmissing-declarations -Wmi
> > > ssing-prototypes -Wpointer-arith -Wreturn-type -Wstrict-prototypes -pedanti
> > > c -ansi -DHAVE_CONFIG_H -I. -I. -I../include -I../include -D_GNU_SOURCE -DP
> > > ATH_SANE_CONFIG_DIR=/usr/local/etc/sane.d -DPATH_SANE_DATA_DIR=/usr/local/s
> > > hare -DV_MAJOR=1 -DV_MINOR=0 -DBACKEND_NAME=dc25 -DLIBDIR=/usr/local/lib/sa
> > > ne dc25.c  -fno-common -DPIC
> > > dc25.c:2757: syntax error, found `fd'
> > > dc25.c:2757: illegal function definition, found `)'
> > 
> > Maybe that gcc doesn't like the UNUSEDARG? However I don't know why it
> > complains about the last usage in that file.

I looked at this again and found out that when I change the line in question
from 
sane_get_select_fd (SANE_Handle UNUSEDARG handle, SANE_Int * UNUSEDARG fd)
to
sane_get_select_fd (SANE_Handle UNUSEDARG handle, SANE_Int UNUSEDARG * fd)

(moved the asterisk after the UNUSEDARG macro), then it compiles. It still
compiles on my Linux system (with gcc 2.95.3). I don't have the hardware
to verify that this does not change the behavior. The fd argument is 
the only pointer that is used with UNUSEDARG. This explains why this
error only shows up with the last instance of UNUSEDARG in this file.

Karl Heinz

-- 
Karl Heinz Kremer                                  khk at khk.net
PGP Key at                 http://www.khk.net/download/khk.asc
EPSON Sane Backend:                         http://www.khk.net
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://alioth-lists.debian.net/pipermail/sane-devel/attachments/20021019/5affc8d8/attachment.sig>


More information about the sane-devel mailing list