commit 3058739cd357329a7d0d650f064e2bb779c9d305 parent 59e1f336790a4cb97d1e8699dcd73f7b9a077a77 Author: Michael Savage <mikejsavage@gmail.com> Date: Fri Oct 14 20:01:39 +0300 Fix some warnings Diffstat:
gpubtt.cc | | | 2 | +- |
pp.cc | | | 4 | ++-- |
diff --git a/gpubtt.cc b/gpubtt.cc @@ -33,7 +33,7 @@ static void gpubtt_build( const glm::ivec2 mid = ( iv0 + iv2 ) / 2; gpubtt_build( verts, i, ohm, btt->left, iv1, mid, iv0 ); - assert( btt->right ); + assert( btt->right != NULL ); gpubtt_build( verts, i, ohm, btt->right, iv2, mid, iv1 ); } else { diff --git a/pp.cc b/pp.cc @@ -163,7 +163,7 @@ static void write_compressed_file( const void * data, size_t len, const char * f // write FILE * file = fopen( path.c_str(), "w" ); - assert( file ); + assert( file != NULL ); // TODO: endianness/use Stream // fwrite( &compressed_len, sizeof( compressed_len ), 1, file ); fwrite( compressed, 1, compressed_len, file ); @@ -231,7 +231,7 @@ int main( int argc, char ** argv ) { int w, h; printf( "decoding\n" ); u8 * heightmap_memory = stbi_load( path.c_str(), &w, &h, NULL, 1 ); - assert( heightmap_memory ); + assert( heightmap_memory != NULL ); const std::string dir = path + ".parts";