Browse Source

a few compiler warnings

David Rose 14 years ago
parent
commit
320be916f5

+ 0 - 1
panda/src/gobj/shader.cxx

@@ -1503,7 +1503,6 @@ cg_compile_shader(const ShaderCaps &caps) {
 ////////////////////////////////////////////////////////////////////
 ////////////////////////////////////////////////////////////////////
 bool Shader::
 bool Shader::
 cg_analyze_entry_point(CGprogram prog, ShaderType type) {
 cg_analyze_entry_point(CGprogram prog, ShaderType type) {
-  CGparameter parameter;
   bool success = true;
   bool success = true;
 
 
   cg_recurse_parameters(cgGetFirstParameter(prog, CG_PROGRAM),type,success);
   cg_recurse_parameters(cgGetFirstParameter(prog, CG_PROGRAM),type,success);

+ 1 - 1
panda/src/grutil/ffmpegTexture.cxx

@@ -666,7 +666,7 @@ read(const Filename &filename) {
   dump_format(_format_context, 0, os_specific.c_str(), false);
   dump_format(_format_context, 0, os_specific.c_str(), false);
   
   
   _stream_number = -1;
   _stream_number = -1;
-  for(int i = 0; i < _format_context->nb_streams; i++) {
+  for(size_t i = 0; i < _format_context->nb_streams; i++) {
     if ((*_format_context->streams[i]->codec).codec_type == AVMEDIA_TYPE_VIDEO) {
     if ((*_format_context->streams[i]->codec).codec_type == AVMEDIA_TYPE_VIDEO) {
       _stream_number = i;
       _stream_number = i;
       break;
       break;

+ 2 - 2
panda/src/grutil/geoMipTerrain.cxx

@@ -661,8 +661,8 @@ unsigned short GeoMipTerrain::
 get_neighbor_level(unsigned short mx, unsigned short my, short dmx, short dmy) {
 get_neighbor_level(unsigned short mx, unsigned short my, short dmx, short dmy) {
   // If we're across the terrain border, check if we want stitching.
   // If we're across the terrain border, check if we want stitching.
   // If not, return the same level as this one - it won't have to make junctions.
   // If not, return the same level as this one - it won't have to make junctions.
-  if (mx + dmx < 0 || mx + dmx >= (_xsize - 1) / _block_size ||
-      my + dmy < 0 || my + dmy >= (_ysize - 1) / _block_size) {
+  if ((int)mx + (int)dmx < 0 || (int)mx + (int)dmx >= ((int)_xsize - 1) / (int)_block_size ||
+      (int)my + (int)dmy < 0 || (int)my + (int)dmy >= ((int)_ysize - 1) / (int)_block_size) {
     return (_stitching) ? _max_level : min(max(_min_level, _levels[mx][my]), _max_level);
     return (_stitching) ? _max_level : min(max(_min_level, _levels[mx][my]), _max_level);
   }
   }
   // If we're rendering bruteforce, the level must be the same as this one.
   // If we're rendering bruteforce, the level must be the same as this one.