[sane-devel] [Janitorial] Zero(!) compiler warnings

Louis Lagendijk louis at fazant.net
Wed Sep 21 20:51:01 UTC 2016


On Wed, 2016-09-21 at 22:12 +0900, Olaf Meeuwissen wrote:
> Hi devs,
> 
> About a year ago, I set out trying to get rid of *all* compiler
> warnings
> on a "well-defined" build platform.  I'm happy to report that we've
> made
> it!  With the commit of ee550e5d[1], the debian-8-full build[2], is
> free
> of compiler warnings!
> 
>  [1] https://gitlab.com/sane-project/backends/commit/ee550e5de8e63664
> 2b9895d54f6740aa38ee6ff8
>  [2] https://gitlab.com/sane-project/backends/builds/4218963
> 
well done, it is good to see things cleaned up. I am afraid that the
"we" above is not correct. It  was your work....Thanks a lot.

> 
> The fedora-24-clang build[7]?  Let's leave that for another
> time.  Much
> of what you see there will pop up with gcc-6.x as well (which will be
> in
> Debian 9, rumoured to release sometime early next year, IIRC).
> 
Fedora 24 already has a GCC 6.1. I did a quick compile and saw 
some 20 odd warnings: some unused defines, some warnings like: 

magicolor.c: In function 'mc_scan_finish':
magicolor.c:1291:2: warning: this 'if' clause does not guard... [-
Wmisleading-indentation]
  if (status != SANE_STATUS_GOOD)
  ^~
magicolor.c:1293:3: note: ...this statement, but the latter is
misleadingly indented as if it is guarded by the 'if'
   return status;
   ^~~~~~

I have not looked at these in more detail (I wish I had more time)

Let me know if you want a log of the full compilation.
best regards, Louis




More information about the sane-devel mailing list