In gcc-4.2.0's release notes:
A new command line option -Waddress has been added to warn about
suspicious uses of memory addresses as, for example, using the
address of a function in a conditional expression, and comparisons
against the memory address of a string literal. This warning is
enabled by -Wall.
This finds three lines in ares_init.c that look like they contain
mistakes. There's a character array that contains a string or just a
'\0', and it looks like the three tests involved are supposed to be
checking if ipbufpfx[0] == '\0' or not, but they are instead testing
the address of ipbufpfx.
The attached patch attempts to fix this. Is that what's intended?
-- ---------------------------------------------------------- Brad Spencer - spencer@jacknife.org - http://jacknife.org/