[BRLTTY] charset.c:getWcharCharset()
Mario Lang
mlang at delysid.org
Sat Mar 10 18:28:47 EST 2007
Hi.
GCC 4.2 on AMD64 reports this:
gcc-4.2 -Wall -Os -I. -I./.. -I. -I.. -D_POSIX_C_SOURCE=2 -D_BSD_SOURCE -D_XOPEN_SOURCE=500 -DHAVE_CONFIG_H -c ./charset.c
./charset.c: In function 'getWcharCharset':
./charset.c:225: warning: format '%u' expects type 'unsigned int', but argument 4 has type 'long unsigned int'
quoting the relevant piece of code:
snprintf(charset, sizeof(charset), "UCS-%u%cE",
sizeof(wchar_t),
#ifdef WORDS_BIGENDIAN
'B'
#else /* WORDS_BIGENDIAN */
'L'
#endif /* WORDS_BIGENDIAN */
);
As I see it, sizeof return type differs on 32/64 bit archs and some
other format string character is needed. But which?
--
CYa,
Mario
More information about the BRLTTY
mailing list