[sane-devel] Compilation warning in SANE CVS

Peter Kirchgessner peter@kirchgessner.net
Wed, 10 Oct 2001 22:44:26 +0200


the warnings are a good tool to discover problems during development.
Reducing the number of warnings can be a good idea. But this depends on
the type of warning.
Some of them could only be solved by adding dummy code ("unused
parameter" in functions called through arrays of pointers to functions).
In that situation I don't change the code just to please the compiler.
BTW: the kernel is not as clean as you believe. It can not be compiled
at all with the compiler options used in SANE-CVS. After removing
-pedantic and -ansi it will generate more than 19.000 warnings . These
are about 17.000 of type "no previous prototype", about 2000 of type
"cast discards qualifiers from pointer target type" and about 50 of type
"pointer of type `void *' used in arithmetic".


"Jaeger, Gerhard" wrote:
> On Dienstag, 9. Oktober 2001 22:21, Henning Meier-Geinitz wrote:
> > 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):
> Hi list,
> shouldn't we try to fix these warnings prior to the next release???
> Quite a lot of them can be fixed easily by the maintainer and should not
> cause too much work...
> As SANE is THE interface for using scanners (okay it's the only one ;-)
> we should not only take care about the functionality but also 'bout code
> quality. Often enough there are runtime problems as cause of unregarded
> warnings.
> If you compile a Linux kernel there are some warnings but not as much as
> 675... and this is much more code!
> Only my 2 cents...
> Gerhard
> _______________________________________________
> Sane-devel mailing list
> Sane-devel@www.mostang.com
> http://www.mostang.com/mailman/listinfo/sane-devel

Peter Kirchgessner
(alternate e-mail: pkirchgessner@t-online.de)