[Bro-Dev] fixing compiler warnings
gregor at icir.org
Fri Jan 21 14:33:03 PST 2011
On 1/21/11 14:00 , Robin Sommer wrote:
> On Fri, Jan 21, 2011 at 16:44 -0500, you wrote:
>> for ticket #319. Could you give some guidance?
> Take a look at the libhilti code, "grep PRI
> binpacpp/hilti/libhilti/*.c" will show some examples of using these
Basically the problem is that the uintXX_t and intXX_t types have to be
printed differently on different platforms (e.g., int64_t could be a %d
or %ld or %lld"). Using the macros gives you a portable way to specify
the format specifier.
So, you have to search the code for all instances were a fixed width
integer is printed (or formated) and change the format specifier to use
one of the macros.
However, I'm not sure whether it makes sense to do this before we check
whether we need to use 64 bit integers in some places. Since these
changes might require another set of updating format specifiers.
<gregor at icir.org> <gregor at icsi.berkeley.edu>
Int. Computer Science Institute (ICSI)
1947 Center St., Ste. 600
Berkeley, CA 94704, USA
More information about the bro-dev