[sane-devel] Compilation warning in SANE CVS

Henning Meier-Geinitz henning@meier-geinitz.de
Tue, 9 Oct 2001 22:21:32 +0200


Hi,

Compiling SANE still results in lots of warnings (ca. 675). Here are
some statistics:

Warnings sorted by backend (./configure --enable-warnings, on a
linux/gcc system):

sanei
      1	sanei_ab306.c
     11	sanei_wire.c
      5	sanei_save_values.c
      8	sanei_scsi.c

backends
     10	abaton.c
      9	agfafocus.c
      9	apple.c
      2	artec.c
      5	as6e.c
     22	avision.c
      2	canon-scsi.c
      4	canon.c
     11	canon-sane.c
     18	coolscan-scsidef.h
     66	coolscan.c
     10	djpeg.c
     17	dc210.c
     17	dmc.c
      3	epson.c
      4	hp-accessor.c
      4	hp-device.c
     55	hp-option.c
      2	hp-scl.c
      2	hp.c
     16	m3096g-scsi.h
     21	m3096g.c
      1	m3096g-scsi.h
     16	microtek.c
     31	mustek_pp.c
     19	nec.c
     11	net.c
      5	pie.c
      9	qcam.c
      6	ricoh.h
      1	ricoh-scsi.c
      8	ricoh.c
     13	s9036.c
     14	sharp.c
      4	sm3600.c
      3	snapscan-scsi.c
      3	snapscan-usb.c
      1	snapscan.c
     18	sp15c-scsi.h
     23	sp15c.c
      1	sp15c-scsi.h
      1	sp15c.c
     16	st400.c
      8	tamarack.c
      2	umax_pp_low.c
      6	umax_pp.c
      2	v4l.c

(meta-) frontends
      1	dll.c
      2	dll-preload.c
      7	dll.c
      2	scanimage.c
      1	stiff.c
      5	saned.c

Warnings sorted by count:

    211	 unused parameter ...
     94	 no previous prototype for ...
     92	 cast discards qualifiers from pointer target type
     60	 pointer targets in passing arg ... of ... differ in signedness
     53	 pointer targets in initialization differ in signedness
     45	 comparison between signed and unsigned
     23	 passing arg ... of ... discards qualifiers from pointer target type
     15	 unused variable ...
     12	 function declaration isn't a prototype
      9	 assignment from incompatible pointer type
      8	 passing arg ... of ... from incompatible pointer type
      7	 ... defined but not used
      6	 ANSI C forbids an empty source file
      4	 overflow in implicit constant conversion
      4	 ANSI C does not allow extra `;' outside of a function
      4	 ... might be used uninitialized in this function
      3  wrong type argument to increment
      2	 `PATH_MAX' redefined
      2	 missing initializer
      2	 ANSI C forbids use of cast expressions as lvalues
      1	 text following `#endif' violates ANSI standard
      1	 suggest explicit braces to avoid ambiguous `else'
      1	 implicit declaration of function ...
      1	 assignment discards qualifiers from pointer target type

Bye,
  Henning