[Bro-Dev] fixing compiler warnings

Gregor Maier gregor at icir.org
Thu Jan 20 17:33:52 PST 2011

On 1/20/11 12:12 , Seth Hall wrote:
> There are a couple of issues left that I'm not sure what to do with them....
> [ 36%] Building CXX object src/CMakeFiles/bro.dir/main.cc.o
> /Users/seth/bro/bro.git/src/main.cc: In function ‘int main(int, char**)’:
> /Users/seth/bro/bro.git/src/main.cc:415: warning: deprecated conversion from string constant to ‘char*’

int main(int argc, char *argv[])
might to the trick....

> [ 70%] Building CXX object src/CMakeFiles/bro.dir/Sessions.cc.o
> /Users/seth/bro/bro.git/src/Sessions.cc: In member function ‘void NetSessions::Internal(const char*, const pcap_pkthdr*, const u_char*)’:
> /Users/seth/bro/bro.git/src/Sessions.cc:1357: warning: format not a string literal and no format arguments

+internal_error("%s", msg);

On a different note wrt to integer format string warnings: These
warnings tend to creep back in whenever you compile on a different
platform that has different integers widths. AFAIK the only way to get
really rid of them for good is to use the macros from inttypes.h
But that's already flagged for the integer types cleanup in ticket #319


Gregor Maier
<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 mailing list