#43 GCC 4.3 Warning Fix

open
nobody
None
5
2008-11-15
2008-11-15
Kyle Hill
No

There's a line in tinyxmlparser.cpp:356 that contains an ambiguous comparison that is reported by GCC 4.3. I think that this line actually contains a bug. I suggest changing the line from:

while ( *p && IsWhiteSpace( *p ) || *p == '\n' || *p =='\r' )

to:

while ( *p && (IsWhiteSpace( *p ) || *p == '\n' || *p =='\r' ))

I looks like the intent is to check for non-0 *p and that *p is whitespace or a newline.

Discussion