You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These two lines cause warnings from the MSVC static code analysis - the simple fix is to explicitly cast the arguments to isspace() to unsigned char, which IIRC is correct usage of this function.
I went ahead and switched to reinterpret_cast<>. Compiles fine on my machine, but it does today. if you still see a warning, go ahead and re-open this.
File: tinyxml2.h
Lines: 366 & 367
These two lines cause warnings from the MSVC static code analysis - the simple fix is to explicitly cast the arguments to isspace() to unsigned char, which IIRC is correct usage of this function.
static const char* SkipWhiteSpace( const char* p ) { while( !IsUTF8Continuation(p) && isspace( *p ) ) { ++p; } return p; }
static char SkipWhiteSpace( char* p ) { while( !IsUTF8Continuation(*p) && isspace( *p ) ) { ++p; } return p; }
Should be:
static const char* SkipWhiteSpace( const char* p ) { while( !IsUTF8Continuation(_p) && isspace( (unsigned char)_p ) ) { ++p; } return p; }
static char* SkipWhiteSpace( char* p ) { while( !IsUTF8Continuation(_p) && isspace( (unsigned char)_p ) ) { ++p; } return p; }
Great library which I've used several times - hope this is helpful.
Cheers.
The text was updated successfully, but these errors were encountered: