stdint.h question

Till Straumann strauman at slac.stanford.edu
Thu May 3 03:14:05 UTC 2007


Who has not encountered those (and other annoying)
warnings:

 > warning: format '%x' expects type 'unsigned int', but argument 6 has 
type 'uint32_t'

e.g., under linux (glibc) I don't get those but when porting code
to RTEMS I do. linux' stdint.h defines uint32_t as 'unsigned int'
(on a 32-bit machine) but RTEMS/newlib as 'unsigned long'.
(BTW: freebsd also uses int / unsigned int for int32_t / uint32_t
[i386, powerpc]).

Does anybody have an idea how to properly deal with this?
I'm inclined to suggest a newlib fix...

-- Till

PS:
Probably this has been answered already but
a quick search of the archives was not successful...




More information about the users mailing list