When building standard configuration on Windows (MSYS + MinGW):

> libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../src 
> -I../../src -g -O2 -D__USE_MINGW_ANSI_STDIO -Wall -Wstrict-prototypes 
> -Wformat-security -Wextra -Wno-unused-parameter -Wbad-function-cast 
> -Wcast-align -Wredundant-decls -Werror -MT target.lo -MD -MP -MF 
> .deps/target.Tpo -c target.c -o target.o
> target.c: In function `handle_dump_image_command':
> target.c:2492: warning: size_t format, ssize_t arg (arg 3)
> make[5]: *** [target.lo] Error 1

This is about:

>               command_print(CMD_CTX,
>                               "dumped %zu bytes in %fs (%0.3f kb/s)", 
> fileio.size,
>                               duration_elapsed(&bench), duration_kbps(&bench, 
> fileio.size));

Casting the first "data" parameter to (unsigned int) fixes that, but I 
don't see that as a good solution, so it should be fixed by someone 
better than me.

Than we have:

> libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../.. 
> -I../../../src -I../../../src -g -O2 -D__USE_MINGW_ANSI_STDIO -Wall 
> -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter 
> -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -MT tcl.lo -MD -MP 
> -MF .deps/tcl.Tpo -c tcl.c -o tcl.o
> tcl.c: In function `handle_flash_write_bank_command':
> tcl.c:631: warning: size_t format, ssize_t arg (arg 3)
> make[5]: *** [tcl.lo] Error 1
> make[5]: Leaving directory `/home/chopin/openocd/0.4.0-rc1/src/flash/nor'

Which is caused by:

>               command_print(CMD_CTX, "wrote %zu byte from file %s to flash 
> bank %u"
>                               " at offset 0x%8.8" PRIx32 " in %fs (%0.3f 
> kb/s)",
>                               fileio.size, CMD_ARGV[1], p->bank_number, 
> offset,
>                               duration_elapsed(&bench), duration_kbps(&bench, 
> fileio.size));

I've made the same "stupid" fix.

More:

> libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../../.. 
> -I../../../src -I../../../src -g -O2 -D__USE_MINGW_ANSI_STDIO -Wall 
> -Wstrict-prototypes -Wformat-security -Wextra -Wno-unused-parameter 
> -Wbad-function-cast -Wcast-align -Wredundant-decls -Werror -MT tcl.lo -MD -MP 
> -MF .deps/tcl.Tpo -c tcl.c -o tcl.o
> tcl.c: In function `handle_nand_dump_command':
> tcl.c:414: warning: size_t format, ssize_t arg (arg 3)
> make[5]: *** [tcl.lo] Error 1
> make[5]: Leaving directory `/home/chopin/openocd/0.4.0-rc1/src/flash/nand'

by:

>               command_print(CMD_CTX, "dumped %zu bytes in %fs (%0.3f kb/s)",
>                               s.fileio.size, duration_elapsed(&s.bench),
>                               duration_kbps(&s.bench, s.fileio.size));

Fixed as above

More:

> libtool: compile:  gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I../.. -I../../src 
> -I../../src -g -O2 -D__USE_MINGW_ANSI_STDIO -Wall -Wstrict-prototypes 
> -Wformat-security -Wextra -Wno-unused-parameter -Wbad-function-cast 
> -Wcast-align -Wredundant-decls -Werror -MT mflash.lo -MD -MP -MF 
> .deps/mflash.Tpo -c mflash.c -o mflash.o
> mflash.c: In function `mg_write_cmd':
> mflash.c:756: warning: size_t format, ssize_t arg (arg 3)
> make[5]: *** [mflash.lo] Error 1
> make[5]: Leaving directory `/home/chopin/openocd/0.4.0-rc1/src/flash'

by:

>               command_print(CMD_CTX, "wrote %zu byte from file %s "
>                               "in %fs (%0.3f kB/s)", fileio.size, CMD_ARGV[1],
>                               duration_elapsed(&bench), duration_kbps(&bench, 
> fileio.size));

Fixed as above

After that OpenOCD compiles fine - now I'm going to test how does it work...

4\/3!!

_______________________________________________
Openocd-development mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/openocd-development

Reply via email to