July 22, 2008 b64 compile error: printf() format warning | ||||
---|---|---|---|---|
| ||||
gcc -D_DEBUG -UNDEBUG -c -Wall -pedantic -Wno-long-long -Wno-unused-value -Wundef -Wshadow -Werror -Dunix -DB64_NO_IMPLICIT_LINK -I../../include -o example.c.2.debug.o ../../examples/c/example.c.2/example.c.2.c cc1: warnings being treated as errors ../../examples/c/example.c.2/example.c.2.c: In function ‘main’: ../../examples/c/example.c.2/example.c.2.c:110: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘long int’ Changing line 110 to following fixes it problem fprintf(stderr, "decoding error %u at character %ld: %s\n", rc, badChar - enc, badChar); |
August 03, 2008 Re: b64 compile error: printf() format warning | ||||
---|---|---|---|---|
| ||||
Posted in reply to mis232 | Thanks. This is now fixed; see http://www.digitalmars.com/webnews/newsgroups.php?art_group=c%2B%2B.stlsoft&article_id=1616 "mis232" <mis232@mis232.com> wrote in message news:g646sc$mkf$1@digitalmars.com... > gcc -D_DEBUG -UNDEBUG -c -Wall -pedantic -Wno-long-long -Wno-unused-value -Wundef -Wshadow -Werror -Dunix -DB64_NO_IMPLICIT_LINK -I../../include -o example.c.2.debug.o ../../examples/c/example.c.2/example.c.2.c > cc1: warnings being treated as errors > ../../examples/c/example.c.2/example.c.2.c: In function 'main': > ../../examples/c/example.c.2/example.c.2.c:110: warning: format '%d' expects type 'int', but argument 4 has type 'long int' > > Changing line 110 to following fixes it problem > > fprintf(stderr, "decoding error %u at character %ld: %s\n", rc, badChar - enc, badChar); > |
Copyright © 1999-2021 by the D Language Foundation