[sane-devel] error when making sane backends - possibly due to changes in cc ?

Paul Newall p.newalls at ntlworld.com
Sun Oct 27 16:34:59 UTC 2013


I upgraded to ubuntu 13.10
Now I get errors when making sane-backends that I don't think I got 
before. The error messages are:

scanimage.c: In function ‘main’:
scanimage.c:1897:5: error: format not a string literal and no format 
arguments [-Werror=format-security]
printf (start);
^
scanimage.c:1911:9: error: format not a string literal and no format 
arguments [-Werror=format-security]
printf (start);
^

I'm guessing ubuntu 13.10 has a new version of gcc which now classifies 
these as errors instead of warnings?
gcc --version returns this:
gcc (Ubuntu/Linaro 4.8.1-10ubuntu8) 4.8.1

and I think ubuntu 13.04 had gcc version 4.7.3

adding a dummy format argument to lines 1897 and 1911 of scanimage.c 
like this:
printf (start,0);
allows it to compile without errors, but I don't know if that might 
cause any problems at run time?
Perhaps there is a better solution, like an option telling gcc to treat 
these as warnings not errors?

regards,
Paul Newall



More information about the sane-devel mailing list