Fixed compilation warnings. Added -Wall to linux-gcc compilation. JSON_ASSERT_MESSAGE now throws exception (but JSON_ASSERT does not).

This commit is contained in:
Christopher Dunn
2007-05-09 19:35:15 +00:00
parent 842d64e8d7
commit a44cffb342
5 changed files with 25 additions and 24 deletions

View File

@@ -13,12 +13,12 @@ readInputTestFile( const char *path )
if ( !file )
return std::string("");
fseek( file, 0, SEEK_END );
int size = ftell( file );
long size = ftell( file );
fseek( file, 0, SEEK_SET );
std::string text;
char *buffer = new char[size+1];
buffer[size] = 0;
if ( fread( buffer, 1, size, file ) == size )
if ( fread( buffer, 1, size, file ) == (unsigned long)size )
text = buffer;
fclose( file );
delete[] buffer;