
Hi Wolfgang,
On Thu, Nov 3, 2011 at 2:39 PM, Wolfgang Denk wd@denx.de wrote:
Dear Simon,
with current top of tree (v2011.09-690-gfec79ac) I see this (on a i686 host):
-> ./MAKEALL sandbox Configuring for sandbox board... cmd_nvedit.c: In function ‘do_env_export’: cmd_nvedit.c:748:3: warning: format ‘%zX’ expects argument of type ‘size_t’, but argument 3 has type ‘long unsigned int’ [-Wformat] cmd_nvedit.c:774:2: warning: format ‘%zX’ expects argument of type ‘size_t’, but argument 3 has type ‘long unsigned int’ [-Wformat]
Interesting - I don't get these but do see another one in the same file:
cmd_nvedit.c:408:2: warning: format ‘%x’ expects argument of type ‘unsigned int’, but argument 3 has type ‘long unsigned int’ [-Wformat]
cmd_nvedit.c: In function ‘do_env_import’: cmd_nvedit.c:865:3: warning: format ‘%zd’ expects argument of type ‘signed size_t’, but argument 2 has type ‘size_t’ [-Wformat] cmd_nvedit.c:865:3: warning: format ‘%zX’ expects argument of type ‘size_t’, but argument 3 has type ‘long unsigned int’ [-Wformat]
I'm not sure what to do with that last one - the two arguments are the same and %X should work ok as unsigned I thought. Since it doesn't happen with my compiler I'm not sure of the best fix - perhaps a cast?
hashtable.c: In function ‘hexport_r’: hashtable.c:494:2: warning: format ‘%d’ expects argument of type ‘int’, but argument 5 has type ‘size_t’ [-Wformat] hashtable.c:542:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ [-Wformat] hashtable.c:542:4: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat] hashtable.c: In function ‘himport_r’: hashtable.c:643:3: warning: format ‘%d’ expects argument of type ‘int’, but argument 2 has type ‘size_t’ [-Wformat]
I will send a patch for these.
text data bss dec hex filename 101737 3004 26128 130869 1ff35 ./u-boot
--------------------- SUMMARY ---------------------------- Boards compiled: 1 Boards with warnings or errors: 1 ( sandbox )
-> git describe v2011.09-690-gfec79ac -> gdb u-boot GNU gdb (GDB) Fedora (7.3-43.fc15) Copyright (C) 2011 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 "i686-redhat-linux-gnu". For bug reporting instructions, please see: http://www.gnu.org/software/gdb/bugs/... Reading symbols from /home/wd/git/u-boot/work/u-boot...done. (gdb) run Starting program: /home/wd/git/u-boot/work/u-boot
Program received signal SIGSEGV, Segmentation fault. memset (s=0x0, c=0, count=72) at string.c:418 418 *sl++ = cl; Missing separate debuginfos, use: debuginfo-install glibc-2.14-5.i686 (gdb) bt #0 memset (s=0x0, c=0, count=72) at string.c:418 #1 0x08048de4 in board_init_f (bootflag=0) at board.c:153 #2 0x08048b58 in main (argc=1, argv=0xbfffeb44) at start.c:30 (gdb)
memset(NULL, 0, 72) ?
This is because an earlier change broken Sandbox by adding dlmalloc.o to common/Makefile twice:
2d01dd9 omap: spl: fix build break due to changes in FAT
I do have a patch to fix it, but a better solution is to apply Matthias Weisser's 'sandbox: Add improved RAM simulation' patch. I will test the latest version today.
Regards, Simon
Best regards,
Wolfgang Denk
-- DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd@denx.de "I'm growing older, but not up." - Jimmy Buffett