From ca86a0fa2ab2dc56141332bd07811e486656879f Mon Sep 17 00:00:00 2001 From: Dmitry-Me Date: Mon, 25 May 2015 11:29:14 +0300 Subject: [PATCH] Proper fix gcc -Wsign-compare --- tinyxml2.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tinyxml2.cpp b/tinyxml2.cpp index 2c07897..667170f 100755 --- a/tinyxml2.cpp +++ b/tinyxml2.cpp @@ -1861,7 +1861,7 @@ XMLError XMLDocument::LoadFile( FILE* fp ) return _errorID; } - if ( (size_t)filelength >= (size_t)-1 ) { + if ( (unsigned long)filelength >= (size_t)-1 ) { // Cannot handle files which won't fit in buffer together with null terminator SetError( XML_ERROR_FILE_READ_ERROR, 0, 0 ); return _errorID;