This is the mail archive of the ecos-patches@sourceware.org mailing list for the eCos project.
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
Other format: | [Raw text] |
Andrew Lunn wrote:@@ -106,7 +106,7 @@ blocks = info.block_info[0].blocks; } for (j=0;j < info.num_block_infos; j++) { - diag_printf("INFO:\t block_size %d, blocks %d\n", + diag_printf("INFO:\t block_size %lu, blocks %u\n", info.block_info[j].block_size, info.block_info[j].blocks); }
Interesting. With this patch i get:
/home/lunn/eCos/anoncvs-clean/packages/devs/flash/synthv2/current/tests/flash2.c: In function 'cyg_user_start':
/home/lunn/eCos/anoncvs-clean/packages/devs/flash/synthv2/current/tests/flash2.c:117: warning: format '%lu' expects type 'long unsigned int', but argument 2 has type 'size_t'
Without the patch it compiles cleanly.
The printf modifier for size_t is %zd, not %d or %ld or %u or %lu. More recent gcc's complain about size_t or ssize_t (which has the same modifier).
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |