64bit debug compiler flag issue
"Daniel E. Shipton" <[email protected]>
| Newsgroups | gmane.comp.graphics.chromium.user |
|---|---|
| Message-ID | <[email protected]> |
When using -Werror for 64bit builds(default for Linux) you come across a
compile failure in printspu_init with gcc 4.1.1:
Compiling printspu_init.c
cc1: warnings being treated as errors
printspu_init.c: In function 'printspu_signal_handler':
printspu_init.c:47: warning: field precision should have type 'int', but
argument 3 has type 'long int'
gmake[3]: *** [../../built/printspu/Linux/printspu_init.o] Error 1
on this lines 47 and 84:
fprintf(print_spu.fp, "%.*s", endOfVariable - nextVariable + 1,
nextVariable);
This warning (turned error) can be avoided by casting the result of the 3rd
arg to an int. fprintf expects you to give it an int if specifying how much
to print. endofVariable and nextVariable are both char* which makes the
whole expression return a long int.
fprintf(print_spu.fp, "%.*s", (int)(endOfVariable - nextVariable +
1), nextVariable);
By changing config/Linux.mk and changing -Werror to -Wall will also let this
build.
When it rains, it pours ;)
-Dan
--
Daniel E. Shipton
Software Engineer, Infiscape Corp.
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Chromium-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/chromium-users