Le 11 janv. 09 à 14:40, Blue Swirl a écrit :
On 1/11/09, Laurent Vivier laurent@lvivier.info wrote:
Hi,
I don't like to have warnings in build.log, but sometime I don't remember to check the logs.
I'm wondering if it is acceptable to add "-Werror" in CCFLAGS ?
There are still some strange warnings on amd64 build:
kernel/bootstrap.c: In function 'segv_handler': kernel/bootstrap.c:799: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'cell' kernel/bootstrap.c:799: warning: format '%llx' expects type 'long long unsigned int', but argument 5 has type 'ucell' kernel/bootstrap.c:799: warning: format '%llx' expects type 'long long unsigned int', but argument 6 has type 'long unsigned int' kernel/bootstrap.c:801: warning: format '%llx' expects type 'long long unsigned int', but argument 4 has type 'ucell' kernel/bootstrap.c: In function 'exception': kernel/bootstrap.c:839: warning: format '%lld' expects type 'long long int', but argument 2 has type 'cell'
kernel/dict.c: In function 'dump_header': kernel/dict.c:122: warning: format '%0llx' expects type 'long long unsigned int', but argument 2 has type 'ucell'
kernel/stack.c: In function 'printdstack': kernel/stack.c:28: warning: format '%llx' expects type 'long long unsigned int', but argument 2 has type 'long int'
kernel/stack.c: In function 'printrstack': kernel/stack.c:39: warning: format '%llx' expects type 'long long unsigned int', but argument 2 has type 'long int'
kernel/dict.c: In function 'dump_header': kernel/dict.c:122: warning: format '%0llx' expects type 'long long unsigned int', but argument 2 has type 'ucell'
This is because FMT_CELL does not match what is needed to print uint64_t (defined by host headers for bootstrap and by our headers for target compile). It's a bit tricky to get it right, I thought I fixed it already.
The reason is:
$ gdb obj-amd64/host/kernel/bootstrap.o GNU gdb 6.8-debian Copyright (C) 2008 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html
This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "x86_64-linux-gnu"... (gdb) whatis dicthead type = cell (gdb) whatis ucell type = uint64_t (gdb) whatis uint64_t type = long unsigned int
FMT_CELL_x must be "lx" not "llx"
Laurent -------------------- laurent@lvivier.info -------------------- "Tout ce qui est impossible reste à accomplir" Jules Verne "Things are only impossible until they're not" Jean-Luc Picard