Browse Source

general: fix various compiler warnings and issues exposed thereby

rdb 7 years ago
parent
commit
6b726fa697
92 changed files with 138 additions and 167 deletions
  1. 3 2
      direct/src/distributed/cConnectionRepository.cxx
  2. 0 1
      dtool/src/cppparser/cppBison.cxx.prebuilt
  3. 0 1
      dtool/src/cppparser/cppBison.yxx
  4. 2 2
      dtool/src/dtoolbase/memoryHook.cxx
  5. 9 6
      dtool/src/interrogate/interfaceMakerPythonNative.cxx
  6. 1 1
      panda/src/bullet/bulletBodyNode.cxx
  7. 2 2
      panda/src/collide/collisionHandlerFluidPusher.cxx
  8. 0 1
      panda/src/collide/collisionTraverser.h
  9. 1 1
      panda/src/display/graphicsStateGuardian.cxx
  10. 1 1
      panda/src/display/graphicsStateGuardian.h
  11. 1 1
      panda/src/egg2pg/eggLoader.cxx
  12. 0 1
      panda/src/egg2pg/eggSaver.cxx
  13. 2 2
      panda/src/event/asyncFuture.I
  14. 2 0
      panda/src/express/pointerToArray_ext.I
  15. 1 2
      panda/src/express/virtualFileSimple.I
  16. 0 1
      panda/src/express/virtualFileSimple.h
  17. 3 9
      panda/src/glstuff/glGraphicsStateGuardian_src.cxx
  18. 1 1
      panda/src/glstuff/glShaderContext_src.cxx
  19. 0 2
      panda/src/gobj/adaptiveLru.cxx
  20. 0 1
      panda/src/gobj/adaptiveLru.h
  21. 14 14
      panda/src/gobj/geomVertexColumn.cxx
  22. 0 1
      panda/src/gobj/geomVertexData.I
  23. 0 1
      panda/src/gobj/geomVertexData.h
  24. 0 1
      panda/src/gobj/preparedGraphicsObjects.cxx
  25. 0 1
      panda/src/gobj/shader.cxx
  26. 1 1
      panda/src/grutil/movieTexture.cxx
  27. 1 1
      panda/src/grutil/movieTexture.h
  28. 1 1
      panda/src/particlesystem/orientedParticleFactory.h
  29. 1 1
      panda/src/physics/actorNode.cxx
  30. 1 1
      panda/src/physics/actorNode.h
  31. 1 1
      panda/src/physics/angularEulerIntegrator.cxx
  32. 1 1
      panda/src/physics/angularEulerIntegrator.h
  33. 1 1
      panda/src/physics/angularForce.cxx
  34. 1 1
      panda/src/physics/angularForce.h
  35. 1 1
      panda/src/physics/angularIntegrator.cxx
  36. 1 1
      panda/src/physics/angularIntegrator.h
  37. 1 1
      panda/src/physics/angularVectorForce.cxx
  38. 1 1
      panda/src/physics/angularVectorForce.h
  39. 3 3
      panda/src/physics/baseIntegrator.cxx
  40. 3 3
      panda/src/physics/baseIntegrator.h
  41. 2 2
      panda/src/physics/forceNode.cxx
  42. 2 2
      panda/src/physics/forceNode.h
  43. 1 1
      panda/src/physics/linearControlForce.cxx
  44. 1 1
      panda/src/physics/linearControlForce.h
  45. 1 1
      panda/src/physics/linearCylinderVortexForce.cxx
  46. 1 1
      panda/src/physics/linearCylinderVortexForce.h
  47. 1 1
      panda/src/physics/linearDistanceForce.cxx
  48. 1 1
      panda/src/physics/linearDistanceForce.h
  49. 1 1
      panda/src/physics/linearEulerIntegrator.cxx
  50. 1 1
      panda/src/physics/linearEulerIntegrator.h
  51. 1 1
      panda/src/physics/linearForce.cxx
  52. 1 1
      panda/src/physics/linearForce.h
  53. 1 1
      panda/src/physics/linearFrictionForce.cxx
  54. 1 1
      panda/src/physics/linearFrictionForce.h
  55. 1 1
      panda/src/physics/linearIntegrator.cxx
  56. 1 1
      panda/src/physics/linearIntegrator.h
  57. 1 1
      panda/src/physics/linearJitterForce.cxx
  58. 1 1
      panda/src/physics/linearJitterForce.h
  59. 1 1
      panda/src/physics/linearNoiseForce.cxx
  60. 1 1
      panda/src/physics/linearNoiseForce.h
  61. 1 1
      panda/src/physics/linearRandomForce.cxx
  62. 1 1
      panda/src/physics/linearRandomForce.h
  63. 1 1
      panda/src/physics/linearSinkForce.cxx
  64. 1 1
      panda/src/physics/linearSinkForce.h
  65. 1 1
      panda/src/physics/linearSourceForce.cxx
  66. 1 1
      panda/src/physics/linearSourceForce.h
  67. 1 1
      panda/src/physics/linearUserDefinedForce.cxx
  68. 1 1
      panda/src/physics/linearUserDefinedForce.h
  69. 1 1
      panda/src/physics/linearVectorForce.cxx
  70. 1 1
      panda/src/physics/linearVectorForce.h
  71. 4 4
      panda/src/physics/physical.cxx
  72. 4 4
      panda/src/physics/physical.h
  73. 1 1
      panda/src/physics/physicalNode.cxx
  74. 1 1
      panda/src/physics/physicalNode.h
  75. 5 5
      panda/src/physics/physicsManager.cxx
  76. 5 5
      panda/src/physics/physicsManager.h
  77. 1 1
      panda/src/physics/physicsObject.cxx
  78. 1 1
      panda/src/physics/physicsObject.h
  79. 3 3
      panda/src/pnmimage/pnmImage.cxx
  80. 0 1
      panda/src/pnmimagetypes/pnmFileTypeEXR.h
  81. 0 12
      panda/src/pnmimagetypes/pnmFileTypeJPG.h
  82. 0 1
      panda/src/text/staticTextFont.h
  83. 0 1
      panda/src/text/textNode.h
  84. 4 4
      panda/src/tinydisplay/store_pixel.h
  85. 6 0
      panda/src/tinydisplay/zfeatures.h
  86. 9 9
      panda/src/tinydisplay/ztriangle_two.h
  87. 0 1
      pandatool/src/egg-palettize/eggPalettize.h
  88. 0 1
      pandatool/src/eggbase/eggWriter.h
  89. 0 2
      pandatool/src/objegg/eggToObjConverter.h
  90. 0 1
      pandatool/src/palettizer/eggFile.h
  91. 0 1
      pandatool/src/palettizer/texturePlacement.h
  92. 0 1
      pandatool/src/pfmprogs/pfmBba.h

+ 3 - 2
direct/src/distributed/cConnectionRepository.cxx

@@ -849,8 +849,9 @@ handle_update_field_owner() {
       vector_uchar data = _di.get_remaining_bytes();
       DCPacker packer;
       packer.set_unpack_data((const char *)data.data(), data.size(), false);
-      int field_id = packer.raw_unpack_uint16();
-      DCField *field = dclass->get_field_by_index(field_id);
+
+      //int field_id = packer.raw_unpack_uint16();
+      //DCField *field = dclass->get_field_by_index(field_id);
       if (true) {//field->is_broadcast()) {
         // It's a good idea to ensure the reference count to distobj is raised
         // while we call the update method--otherwise, the update method might

+ 0 - 1
dtool/src/cppparser/cppBison.cxx.prebuilt

@@ -110,7 +110,6 @@ static CPPEnumType *current_enum = NULL;
 static int current_storage_class = 0;
 static CPPType *current_type = NULL;
 static CPPExpression *current_expr = NULL;
-static CPPClosureType *current_closure = NULL;
 static int publish_nest_level = 0;
 static CPPVisibility publish_previous;
 static YYLTYPE publish_loc;

+ 0 - 1
dtool/src/cppparser/cppBison.yxx

@@ -45,7 +45,6 @@ static CPPEnumType *current_enum = NULL;
 static int current_storage_class = 0;
 static CPPType *current_type = NULL;
 static CPPExpression *current_expr = NULL;
-static CPPClosureType *current_closure = NULL;
 static int publish_nest_level = 0;
 static CPPVisibility publish_previous;
 static YYLTYPE publish_loc;

+ 2 - 2
dtool/src/dtoolbase/memoryHook.cxx

@@ -216,12 +216,12 @@ MemoryHook() {
  */
 MemoryHook::
 MemoryHook(const MemoryHook &copy) :
-  _page_size(copy._page_size),
   _total_heap_single_size(copy._total_heap_single_size),
   _total_heap_array_size(copy._total_heap_array_size),
   _requested_heap_size(copy._requested_heap_size),
   _total_mmap_size(copy._total_mmap_size),
-  _max_heap_size(copy._max_heap_size) {
+  _max_heap_size(copy._max_heap_size),
+  _page_size(copy._page_size) {
 
   copy._lock.lock();
   _deleted_chains = copy._deleted_chains;

+ 9 - 6
dtool/src/interrogate/interfaceMakerPythonNative.cxx

@@ -2636,8 +2636,6 @@ write_module_class(ostream &out, Object *obj) {
   if (obj->_properties.size() > 0) {
     // Write out the array of properties, telling Python which getter and
     // setter to call when they are assigned or queried in Python code.
-    out << "static PyGetSetDef Dtool_Properties_" << ClassName << "[] = {\n";
-
     Properties::const_iterator pit;
     for (pit = obj->_properties.begin(); pit != obj->_properties.end(); ++pit) {
       Property *property = (*pit);
@@ -2646,6 +2644,10 @@ write_module_class(ostream &out, Object *obj) {
         continue;
       }
 
+      if (num_getset == 0) {
+        out << "static PyGetSetDef Dtool_Properties_" << ClassName << "[] = {\n";
+      }
+
       ++num_getset;
 
       string name1 = methodNameFromCppName(ielem.get_name(), "", false);
@@ -2679,8 +2681,10 @@ write_module_class(ostream &out, Object *obj) {
       }*/
     }
 
-    out << "  {NULL},\n";
-    out << "};\n\n";
+    if (num_getset != 0) {
+      out << "  {NULL},\n";
+      out << "};\n\n";
+    }
   }
 
   // These fields are inherited together.  We should either write all of them
@@ -7077,9 +7081,8 @@ record_object(TypeIndex type_index) {
   int num_elements = itype.number_of_elements();
   for (int ei = 0; ei < num_elements; ei++) {
     ElementIndex element_index = itype.get_element(ei);
-    const InterrogateElement &ielement = idb->get_element(element_index);
 
-    Property *property = record_property(itype, itype.get_element(ei));
+    Property *property = record_property(itype, element_index);
     if (property != nullptr) {
       object->_properties.push_back(property);
     } else {

+ 1 - 1
panda/src/bullet/bulletBodyNode.cxx

@@ -864,7 +864,7 @@ cout << "origin " << aabbMin.x() << " " << aabbMin.y() << " " << aabbMin.z() <<
 */
 
   btVector3 center;
-  btScalar radius;
+  btScalar radius = 0;
 
   if (_shape) {
     _shape->getBoundingSphere(center, radius);

+ 2 - 2
panda/src/collide/collisionHandlerFluidPusher.cxx

@@ -154,7 +154,7 @@ handle_entries() {
 
       // unit vector pointing out to the right relative to the direction of
       // motion, looking into the direction of motion
-      const LVector3 right_unit(LVector3::up().cross(reverse_vec));
+      //const LVector3 right_unit(LVector3::up().cross(reverse_vec));
 
       // iterate until the mover runs out of movement or gets stuck
       while (true) {
@@ -214,7 +214,7 @@ handle_entries() {
         from_node_path.set_prev_transform(wrt_node, prev_trans);
 
         {
-          const LPoint3 new_pos(from_node_path.get_pos(wrt_node));
+          //const LPoint3 new_pos(from_node_path.get_pos(wrt_node));
           CPT(TransformState) new_prev_trans(from_node_path.get_prev_transform(wrt_node));
           const LPoint3 new_prev_pos(new_prev_trans->get_pos());
         }

+ 0 - 1
panda/src/collide/collisionTraverser.h

@@ -111,7 +111,6 @@ private:
 
 private:
   PT(CollisionHandler) _default_handler;
-  TypeHandle _graph_type;
 
   class OrderedColliderDef {
   public:

+ 1 - 1
panda/src/display/graphicsStateGuardian.cxx

@@ -551,7 +551,7 @@ get_scene() const {
  * call Texture::prepare().
  */
 TextureContext *GraphicsStateGuardian::
-prepare_texture(Texture *) {
+prepare_texture(Texture *, int view) {
   return (TextureContext *)NULL;
 }
 

+ 1 - 1
panda/src/display/graphicsStateGuardian.h

@@ -290,7 +290,7 @@ PUBLISHED:
   MAKE_PROPERTY(scene, get_scene, set_scene);
 
 public:
-  virtual TextureContext *prepare_texture(Texture *tex);
+  virtual TextureContext *prepare_texture(Texture *tex, int view);
   virtual bool update_texture(TextureContext *tc, bool force);
   virtual void release_texture(TextureContext *tc);
   virtual bool extract_texture_data(Texture *tex);

+ 1 - 1
panda/src/egg2pg/eggLoader.cxx

@@ -3792,7 +3792,7 @@ TextureStage::CombineOperand EggLoader::
 get_combine_operand(const EggTexture *egg_tex,
                     EggTexture::CombineChannel channel, int n) {
   switch (egg_tex->get_combine_operand(channel, n)) {
-  case EggTexture::CS_unspecified:
+  case EggTexture::CO_unspecified:
     if (channel == EggTexture::CC_rgb) {
       // The default operand for RGB is src_color, except for the third
       // parameter, which defaults to src_alpha.

+ 0 - 1
panda/src/egg2pg/eggSaver.cxx

@@ -839,7 +839,6 @@ convert_primitive(const GeomVertexData *vertex_data,
   }
 
   // Check the backface flag.
-  bool bface = false;
   const CullFaceAttrib *cfa;
   if (net_state->get_attrib(cfa)) {
     if (cfa->get_effective_mode() == CullFaceAttrib::M_cull_none) {

+ 2 - 2
panda/src/event/asyncFuture.I

@@ -17,8 +17,8 @@
 INLINE AsyncFuture::
 AsyncFuture() :
   _manager(nullptr),
-  _future_state(FS_pending),
-  _result(nullptr) {
+  _result(nullptr),
+  _future_state(FS_pending) {
 }
 
 /**

+ 2 - 0
panda/src/express/pointerToArray_ext.I

@@ -37,6 +37,8 @@ INLINE void set_matrix_view(Py_buffer &view, int flags, int length, int size, bo
     mat_size = sizeof(UnalignedLMatrix4f);
   } else if (size == 4 && double_prec) {
     mat_size = sizeof(UnalignedLMatrix4d);
+  } else {
+    assert(false);
   }
 
   view.len = length * mat_size;

+ 1 - 2
panda/src/express/virtualFileSimple.I

@@ -19,8 +19,7 @@ VirtualFileSimple(VirtualFileMount *mount, const Filename &local_filename,
                   bool implicit_pz_file, int open_flags) :
   _mount(mount),
   _local_filename(local_filename),
-  _implicit_pz_file(implicit_pz_file),
-  _open_flags(open_flags)
+  _implicit_pz_file(implicit_pz_file)
 {
 }
 

+ 0 - 1
panda/src/express/virtualFileSimple.h

@@ -74,7 +74,6 @@ private:
   VirtualFileMount *_mount;
   Filename _local_filename;
   bool _implicit_pz_file;
-  int _open_flags;
 
 public:
   virtual TypeHandle get_type() const {

+ 3 - 9
panda/src/glstuff/glGraphicsStateGuardian_src.cxx

@@ -2643,7 +2643,6 @@ reset() {
   GLint max_3d_texture_size = 0;
   GLint max_2d_texture_array_layers = 0;
   GLint max_cube_map_size = 0;
-  GLint max_buffer_texture_size = 0;
 
   glGetIntegerv(GL_MAX_TEXTURE_SIZE, &max_texture_size);
   _max_texture_dimension = max_texture_size;
@@ -2671,6 +2670,7 @@ reset() {
 
 #ifndef OPENGLES
   if (_supports_buffer_texture) {
+    GLint max_buffer_texture_size = 0;
     glGetIntegerv(GL_MAX_TEXTURE_BUFFER_SIZE, &max_buffer_texture_size);
     _max_buffer_texture_size = max_buffer_texture_size;
   } else {
@@ -2678,8 +2678,8 @@ reset() {
   }
 #endif  // !OPENGLES
 
-  GLint max_elements_vertices = 0, max_elements_indices = 0;
 #ifndef OPENGLES
+  GLint max_elements_vertices = 0, max_elements_indices = 0;
   if (is_at_least_gl_version(1, 2) || has_extension("GL_EXT_draw_range_elements")) {
     glGetIntegerv(GL_MAX_ELEMENTS_VERTICES, &max_elements_vertices);
     glGetIntegerv(GL_MAX_ELEMENTS_INDICES, &max_elements_indices);
@@ -7604,7 +7604,6 @@ do_issue_blending() {
 #endif
 
   if (color_channels == ColorWriteAttrib::C_off) {
-    int color_write_slot = ColorWriteAttrib::get_class_slot();
     enable_multisample_alpha_one(false);
     enable_multisample_alpha_mask(false);
     if (gl_color_mask) {
@@ -8311,7 +8310,6 @@ report_extensions() const {
     ostream &out = GLCAT.debug();
     out << "GL Extensions:\n";
 
-    size_t maxlen = 0;
     pset<string>::const_iterator ei;
     for (ei = _extensions.begin(); ei != _extensions.end(); ++ei) {
       size_t len = (*ei).size();
@@ -10915,7 +10913,6 @@ set_state_and_transform(const RenderState *target,
       !_state_mask.get_bit(texture_slot)) {
     // PStatGPUTimer timer(this, _draw_set_state_texture_pcollector);
     determine_target_texture();
-    int prev_active = _num_active_texture_stages;
     do_issue_texture();
 
     // Since the TexGen and TexMatrix states depend partly on the particular
@@ -12264,10 +12261,8 @@ upload_texture(CLP(TextureContext) *gtc, bool force, bool uses_mipmaps) {
   }
 
   if (image_compression != Texture::CM_off) {
-    Texture::QualityLevel quality_level = tex->get_effective_quality_level();
-
 #ifndef OPENGLES
-    switch (quality_level) {
+    switch (tex->get_effective_quality_level()) {
     case Texture::QL_fastest:
       glHint(GL_TEXTURE_COMPRESSION_HINT, GL_FASTEST);
       break;
@@ -13150,7 +13145,6 @@ get_texture_memory_size(CLP(TextureContext) *gtc) {
   int height = tex->get_y_size();
   int depth = 1;
   int scale = 1;
-  bool has_mipmaps = tex->uses_mipmaps();
 
   size_t num_bytes = 2;  // Temporary assumption?
 

+ 1 - 1
panda/src/glstuff/glShaderContext_src.cxx

@@ -2660,9 +2660,9 @@ update_shader_texture_bindings(ShaderContext *prev) {
       continue;
     }
 
+#ifndef OPENGLES
     GLint p = spec._id._seqno;
 
-#ifndef OPENGLES
     // If it was recently written to, we will have to issue a memory barrier
     // soon.
     if (gtc->needs_barrier(GL_TEXTURE_FETCH_BARRIER_BIT)) {

+ 0 - 2
panda/src/gobj/adaptiveLru.cxx

@@ -455,7 +455,6 @@ AdaptiveLruPage(size_t lru_size) :
   _update_frame_identifier(0),
   _current_frame_usage(0),
   _last_frame_usage(0),
-  _total_usage(0),
   _update_total_usage(0),
   _average_frame_utilization(1.0f)
 {
@@ -474,7 +473,6 @@ AdaptiveLruPage(const AdaptiveLruPage &copy) :
   _update_frame_identifier(0),
   _current_frame_usage(0),
   _last_frame_usage(0),
-  _total_usage(0),
   _update_total_usage(0),
   _average_frame_utilization(1.0f)
 {

+ 0 - 1
panda/src/gobj/adaptiveLru.h

@@ -172,7 +172,6 @@ private:
 
   int _current_frame_usage;
   int _last_frame_usage;
-  int _total_usage;
   int _update_total_usage;
 
   PN_stdfloat _average_frame_utilization;

+ 14 - 14
panda/src/gobj/geomVertexColumn.cxx

@@ -3869,9 +3869,9 @@ set_data3f(unsigned char *pointer, const LVecBase3f &data) {
       {
         LVecBase3f scaled = data * 4294967295.0f;
         uint32_t *pi = (uint32_t *)pointer;
-        pi[0] = (unsigned int)data[0];
-        pi[1] = (unsigned int)data[1];
-        pi[2] = (unsigned int)data[2];
+        pi[0] = (unsigned int)scaled[0];
+        pi[1] = (unsigned int)scaled[1];
+        pi[2] = (unsigned int)scaled[2];
       }
       break;
 
@@ -3960,10 +3960,10 @@ set_data4f(unsigned char *pointer, const LVecBase4f &data) {
       {
         LVecBase4f scaled = data * 4294967295.0f;
         uint32_t *pi = (uint32_t *)pointer;
-        pi[0] = (unsigned int)data[0];
-        pi[1] = (unsigned int)data[1];
-        pi[2] = (unsigned int)data[2];
-        pi[3] = (unsigned int)data[3];
+        pi[0] = (unsigned int)scaled[0];
+        pi[1] = (unsigned int)scaled[1];
+        pi[2] = (unsigned int)scaled[2];
+        pi[3] = (unsigned int)scaled[3];
       }
       break;
 
@@ -4072,9 +4072,9 @@ set_data3d(unsigned char *pointer, const LVecBase3d &data) {
       {
         LVecBase3d scaled = data * 4294967295.0;
         uint32_t *pi = (uint32_t *)pointer;
-        pi[0] = (unsigned int)data[0];
-        pi[1] = (unsigned int)data[1];
-        pi[2] = (unsigned int)data[2];
+        pi[0] = (unsigned int)scaled[0];
+        pi[1] = (unsigned int)scaled[1];
+        pi[2] = (unsigned int)scaled[2];
       }
       break;
 
@@ -4163,10 +4163,10 @@ set_data4d(unsigned char *pointer, const LVecBase4d &data) {
       {
         LVecBase4d scaled = data * 4294967295.0;
         uint32_t *pi = (uint32_t *)pointer;
-        pi[0] = (unsigned int)data[0];
-        pi[1] = (unsigned int)data[1];
-        pi[2] = (unsigned int)data[2];
-        pi[3] = (unsigned int)data[3];
+        pi[0] = (unsigned int)scaled[0];
+        pi[1] = (unsigned int)scaled[1];
+        pi[2] = (unsigned int)scaled[2];
+        pi[3] = (unsigned int)scaled[3];
       }
       break;
 

+ 0 - 1
panda/src/gobj/geomVertexData.I

@@ -837,7 +837,6 @@ GeomVertexDataPipelineWriter(GeomVertexData *object, bool force_to_0,
                              Thread *current_thread) :
   GeomVertexDataPipelineBase(object, current_thread,
                              object->_cycler.write_upstream(force_to_0, current_thread)),
-  _force_to_0(force_to_0),
   _got_array_writers(false)
 {
 #ifdef _DEBUG

+ 0 - 1
panda/src/gobj/geomVertexData.h

@@ -530,7 +530,6 @@ private:
   void make_array_writers();
   void delete_array_writers();
 
-  bool _force_to_0;
   bool _got_array_writers;
   typedef pvector<PT(GeomVertexArrayDataHandle) > ArrayWriters;
   ArrayWriters _array_writers;

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

@@ -1580,7 +1580,6 @@ begin_frame(GraphicsStateGuardianBase *gsg, Thread *current_thread) {
        qti != _enqueued_textures.end();
        ++qti) {
     Texture *tex = qti->first;
-    TextureContext *first_tc = nullptr;
     for (int view = 0; view < tex->get_num_views(); ++view) {
       TextureContext *tc = tex->prepare_now(view, this, gsg);
       if (tc != nullptr) {

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

@@ -2709,7 +2709,6 @@ r_preprocess_source(ostream &out, const Filename &fn,
       // Check for an #endif after an include.  We have to restore the line
       // number in case the include happened under an #if block.
       out << line << "\n";
-      int nread = 0;
       if (had_include) {
         out << "#line " << (lineno + 1) << " " << fileno << "\n";
       }

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

@@ -387,7 +387,7 @@ cull_callback(CullTraverser *, const CullTraverserData &) const {
  * independently of the original.
  */
 PT(Texture) MovieTexture::
-make_copy_impl() {
+make_copy_impl() const {
   Texture::CDReader cdata_tex(Texture::_cycler);
   CDReader cdata(_cycler);
   PT(MovieTexture) copy = new MovieTexture(get_name());

+ 1 - 1
panda/src/grutil/movieTexture.h

@@ -80,7 +80,7 @@ public:
 protected:
   class CData;
 
-  virtual PT(Texture) make_copy_impl();
+  virtual PT(Texture) make_copy_impl() const;
   void do_assign(CData *cdata, Texture::CData *cdata_tex, const MovieTexture *copy,
                  const CData *cdata_copy, const Texture::CData *cdata_copy_tex);
 

+ 1 - 1
panda/src/particlesystem/orientedParticleFactory.h

@@ -33,7 +33,7 @@ PUBLISHED:
   INLINE LOrientation get_final_orientation() const;
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 private:
   virtual void populate_child_particle(BaseParticle *bp) const;

+ 1 - 1
panda/src/physics/actorNode.cxx

@@ -120,7 +120,7 @@ transform_changed() {
  * Write a string representation of this instance to <out>.
  */
 void ActorNode::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"ActorNode:\n";
   out.width(indent+2); out<<""; out<<"_ok_to_callback "<<_ok_to_callback<<"\n";

+ 1 - 1
panda/src/physics/actorNode.h

@@ -39,7 +39,7 @@ PUBLISHED:
   void update_transform();
 
   void set_transform_limit(PN_stdfloat limit) { _transform_limit = limit; };
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 private:
   PhysicsObject *_mass_center;

+ 1 - 1
panda/src/physics/angularEulerIntegrator.cxx

@@ -152,7 +152,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void AngularEulerIntegrator::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"AngularEulerIntegrator:\n";
   AngularIntegrator::write(out, indent+2);

+ 1 - 1
panda/src/physics/angularEulerIntegrator.h

@@ -26,7 +26,7 @@ PUBLISHED:
   virtual ~AngularEulerIntegrator();
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 private:
   virtual void child_integrate(Physical *physical,

+ 1 - 1
panda/src/physics/angularForce.cxx

@@ -69,7 +69,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void AngularForce::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"AngularForce (id "<<this<<")\n";
   BaseForce::write(out, indent+2);

+ 1 - 1
panda/src/physics/angularForce.h

@@ -28,7 +28,7 @@ PUBLISHED:
   virtual bool is_linear() const;
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 protected:
   AngularForce();

+ 1 - 1
panda/src/physics/angularIntegrator.cxx

@@ -59,7 +59,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void AngularIntegrator::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"AngularIntegrator:\n";
   out.width(indent+2); out<<""; out<<"_max_angular_dt "<<_max_angular_dt<<" (class const)\n";

+ 1 - 1
panda/src/physics/angularIntegrator.h

@@ -32,7 +32,7 @@ public:
 
 PUBLISHED:
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 protected:
   AngularIntegrator();

+ 1 - 1
panda/src/physics/angularVectorForce.cxx

@@ -78,7 +78,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void AngularVectorForce::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"AngularVectorForce:\n";
   out.width(indent+2); out<<""; out<<"_fvec "<<_fvec<<"\n";

+ 1 - 1
panda/src/physics/angularVectorForce.h

@@ -32,7 +32,7 @@ PUBLISHED:
   INLINE LRotation get_local_quat() const;
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 private:
   LRotation _fvec;

+ 3 - 3
panda/src/physics/baseIntegrator.cxx

@@ -149,7 +149,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void BaseIntegrator::
-write_precomputed_linear_matrices(ostream &out, unsigned int indent) const {
+write_precomputed_linear_matrices(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent);
   out<<""<<"_precomputed_linear_matrices\n";
@@ -165,7 +165,7 @@ write_precomputed_linear_matrices(ostream &out, unsigned int indent) const {
  * Write a string representation of this instance to <out>.
  */
 void BaseIntegrator::
-write_precomputed_angular_matrices(ostream &out, unsigned int indent) const {
+write_precomputed_angular_matrices(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent);
   out<<""<<"_precomputed_angular_matrices\n";
@@ -181,7 +181,7 @@ write_precomputed_angular_matrices(ostream &out, unsigned int indent) const {
  * Write a string representation of this instance to <out>.
  */
 void BaseIntegrator::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"BaseIntegrator:\n";
   write_precomputed_linear_matrices(out, indent+2);

+ 3 - 3
panda/src/physics/baseIntegrator.h

@@ -42,10 +42,10 @@ public:
 PUBLISHED:
   virtual void output(ostream &out) const;
   virtual void write_precomputed_linear_matrices(ostream &out,
-                                                 unsigned int indent=0) const;
+                                                 int indent=0) const;
   virtual void write_precomputed_angular_matrices(ostream &out,
-                                                  unsigned int indent=0) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+                                                  int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 protected:
   BaseIntegrator();

+ 2 - 2
panda/src/physics/forceNode.cxx

@@ -133,7 +133,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void ForceNode::
-write_forces(ostream &out, unsigned int indent) const {
+write_forces(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""<<"_forces ("<<_forces.size()<<" forces)"<<"\n";
   for (ForceVector::const_iterator i=_forces.begin();
@@ -149,7 +149,7 @@ write_forces(ostream &out, unsigned int indent) const {
  * Write a string representation of this instance to <out>.
  */
 void ForceNode::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"ForceNode (id "<<this<<") ";
   // #*#PandaNode::output(out);

+ 2 - 2
panda/src/physics/forceNode.h

@@ -42,8 +42,8 @@ PUBLISHED:
   MAKE_SEQ_PROPERTY(forces, get_num_forces, get_force, set_force, remove_force, insert_force);
 
   virtual void output(ostream &out) const;
-  virtual void write_forces(ostream &out, unsigned int indent=0) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write_forces(ostream &out, int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 public:
   virtual ~ForceNode();

+ 1 - 1
panda/src/physics/linearControlForce.cxx

@@ -81,7 +81,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void LinearControlForce::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"LinearControlForce:\n";
   out.width(indent+2); out<<""; out<<"_fvec "<<_fvec<<"\n";

+ 1 - 1
panda/src/physics/linearControlForce.h

@@ -39,7 +39,7 @@ PUBLISHED:
   INLINE LVector3 get_local_vector() const;
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 private:
   CPT(PhysicsObject) _physics_object;

+ 1 - 1
panda/src/physics/linearCylinderVortexForce.cxx

@@ -127,7 +127,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void LinearCylinderVortexForce::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"LinearCylinderVortexForce:\n";
   LinearForce::write(out, indent+2);

+ 1 - 1
panda/src/physics/linearCylinderVortexForce.h

@@ -43,7 +43,7 @@ PUBLISHED:
   INLINE PN_stdfloat get_length() const;
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 private:
   PN_stdfloat _radius;

+ 1 - 1
panda/src/physics/linearDistanceForce.cxx

@@ -57,7 +57,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void LinearDistanceForce::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"LinearDistanceForce:\n";
   out.width(indent+2); out<<""; out<<"_force_center "<<_force_center<<"\n";

+ 1 - 1
panda/src/physics/linearDistanceForce.h

@@ -40,7 +40,7 @@ PUBLISHED:
   INLINE PN_stdfloat get_scalar_term() const;
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 private:
   LPoint3 _force_center;

+ 1 - 1
panda/src/physics/linearEulerIntegrator.cxx

@@ -199,7 +199,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void LinearEulerIntegrator::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent);
   out<<""<<"LinearEulerIntegrator:\n";

+ 1 - 1
panda/src/physics/linearEulerIntegrator.h

@@ -26,7 +26,7 @@ PUBLISHED:
   virtual ~LinearEulerIntegrator();
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 private:
   virtual void child_integrate(Physical *physical,

+ 1 - 1
panda/src/physics/linearForce.cxx

@@ -92,7 +92,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void LinearForce::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"LinearForce (id "<<this<<")\n";
   out.width(indent+2); out<<""; out<<"_amplitude "<<_amplitude<<"\n";

+ 1 - 1
panda/src/physics/linearForce.h

@@ -40,7 +40,7 @@ PUBLISHED:
   virtual bool is_linear() const;
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 protected:
   LinearForce(PN_stdfloat a, bool mass);

+ 1 - 1
panda/src/physics/linearFrictionForce.cxx

@@ -83,7 +83,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void LinearFrictionForce::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"LinearFrictionForce:\n";
   out.width(indent+2); out<<""; out<<"_coef "<<_coef<<":\n";

+ 1 - 1
panda/src/physics/linearFrictionForce.h

@@ -29,7 +29,7 @@ PUBLISHED:
   INLINE PN_stdfloat get_coef() const;
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 private:
   PN_stdfloat _coef;

+ 1 - 1
panda/src/physics/linearIntegrator.cxx

@@ -78,7 +78,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void LinearIntegrator::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"LinearIntegrator:\n";
   out.width(indent+2); out<<""; out<<"_max_linear_dt "<<_max_linear_dt<<" (class static)\n";

+ 1 - 1
panda/src/physics/linearIntegrator.h

@@ -33,7 +33,7 @@ public:
 
 PUBLISHED:
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 protected:
   LinearIntegrator();

+ 1 - 1
panda/src/physics/linearJitterForce.cxx

@@ -68,7 +68,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void LinearJitterForce::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"LinearJitterForce:\n";
   LinearRandomForce::write(out, indent+2);

+ 1 - 1
panda/src/physics/linearJitterForce.h

@@ -27,7 +27,7 @@ PUBLISHED:
   virtual ~LinearJitterForce();
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 private:
   virtual LVector3 get_child_vector(const PhysicsObject *po);

+ 1 - 1
panda/src/physics/linearNoiseForce.cxx

@@ -146,7 +146,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void LinearNoiseForce::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent);
   out<<""<<"LinearNoiseForce:";

+ 1 - 1
panda/src/physics/linearNoiseForce.h

@@ -28,7 +28,7 @@ PUBLISHED:
   virtual ~LinearNoiseForce();
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 public:
   static ConfigVariableInt _random_seed;

+ 1 - 1
panda/src/physics/linearRandomForce.cxx

@@ -60,7 +60,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void LinearRandomForce::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"LinearRandomForce:\n";
   LinearForce::write(out, indent+2);

+ 1 - 1
panda/src/physics/linearRandomForce.h

@@ -27,7 +27,7 @@ PUBLISHED:
   virtual ~LinearRandomForce();
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 protected:
   static PN_stdfloat bounded_rand();

+ 1 - 1
panda/src/physics/linearSinkForce.cxx

@@ -78,7 +78,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void LinearSinkForce::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"LinearSinkForce:\n";
   LinearDistanceForce::write(out, indent+2);

+ 1 - 1
panda/src/physics/linearSinkForce.h

@@ -28,7 +28,7 @@ PUBLISHED:
   virtual ~LinearSinkForce();
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 private:
   virtual LVector3 get_child_vector(const PhysicsObject *po);

+ 1 - 1
panda/src/physics/linearSourceForce.cxx

@@ -78,7 +78,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void LinearSourceForce::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"LinearSourceForce:\n";
   LinearDistanceForce::write(out, indent+2);

+ 1 - 1
panda/src/physics/linearSourceForce.h

@@ -28,7 +28,7 @@ PUBLISHED:
   virtual ~LinearSourceForce();
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 private:
   virtual LVector3 get_child_vector(const PhysicsObject *po);

+ 1 - 1
panda/src/physics/linearUserDefinedForce.cxx

@@ -72,7 +72,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void LinearUserDefinedForce::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"LinearUserDefinedForce:\n";
   LinearForce::write(out, indent+2);

+ 1 - 1
panda/src/physics/linearUserDefinedForce.h

@@ -29,7 +29,7 @@ PUBLISHED:
   INLINE void set_proc(LVector3 (*proc)(const PhysicsObject *));
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 private:
   LVector3 (*_proc)(const PhysicsObject *po);

+ 1 - 1
panda/src/physics/linearVectorForce.cxx

@@ -84,7 +84,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void LinearVectorForce::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"LinearVectorForce:\n";
   out.width(indent+2); out<<""; out<<"_fvec "<<_fvec<<"\n";

+ 1 - 1
panda/src/physics/linearVectorForce.h

@@ -34,7 +34,7 @@ PUBLISHED:
   INLINE LVector3 get_local_vector() const;
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 public:
   INLINE LinearVectorForce& operator += (const LinearVectorForce &other);

+ 4 - 4
panda/src/physics/physical.cxx

@@ -134,7 +134,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void Physical::
-write_physics_objects(ostream &out, unsigned int indent) const {
+write_physics_objects(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent);
   out<<""<<"_physics_objects ("<<_physics_objects.size()<<" objects)\n";
@@ -150,7 +150,7 @@ write_physics_objects(ostream &out, unsigned int indent) const {
  * Write a string representation of this instance to <out>.
  */
 void Physical::
-write_linear_forces(ostream &out, unsigned int indent) const {
+write_linear_forces(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent);
   out<<""<<"_linear_forces ("<<_linear_forces.size()<<" forces)\n";
@@ -166,7 +166,7 @@ write_linear_forces(ostream &out, unsigned int indent) const {
  * Write a string representation of this instance to <out>.
  */
 void Physical::
-write_angular_forces(ostream &out, unsigned int indent) const {
+write_angular_forces(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent);
   out<<""<<"_angular_forces ("<<_angular_forces.size()<<" forces)\n";
@@ -182,7 +182,7 @@ write_angular_forces(ostream &out, unsigned int indent) const {
  * Write a string representation of this instance to <out>.
  */
 void Physical::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""<<"Physical\n";
   write_physics_objects(out, indent+2);

+ 4 - 4
panda/src/physics/physical.h

@@ -75,12 +75,12 @@ PUBLISHED:
 
   virtual void output(ostream &out = cout) const;
   virtual void write_physics_objects(
-    ostream &out = cout, unsigned int indent=0) const;
+    ostream &out = cout, int indent=0) const;
   virtual void write_linear_forces(
-    ostream &out = cout, unsigned int indent=0) const;
+    ostream &out = cout, int indent=0) const;
   virtual void write_angular_forces(
-    ostream &out = cout, unsigned int indent=0) const;
-  virtual void write(ostream &out = cout, unsigned int indent=0) const;
+    ostream &out = cout, int indent=0) const;
+  virtual void write(ostream &out = cout, int indent=0) const;
 
 public:
   INLINE const PhysicsObject::Vector &get_object_vector() const;

+ 1 - 1
panda/src/physics/physicalNode.cxx

@@ -133,7 +133,7 @@ remove_physical(size_t index) {
  * Write a string representation of this instance to <out>.
  */
 void PhysicalNode::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""; out<<"PhysicalNode:\n";
   // PandaNode::write(out, indent+2);

+ 1 - 1
panda/src/physics/physicalNode.h

@@ -43,7 +43,7 @@ PUBLISHED:
   MAKE_SEQ_PROPERTY(physicals, get_num_physicals, get_physical, set_physical,
                     remove_physical, insert_physical);
 
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 public:
   virtual ~PhysicalNode();

+ 5 - 5
panda/src/physics/physicsManager.cxx

@@ -186,7 +186,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void PhysicsManager::
-write_physicals(ostream &out, unsigned int indent) const {
+write_physicals(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   if (indent>10) {
     return;
@@ -206,7 +206,7 @@ write_physicals(ostream &out, unsigned int indent) const {
  * Write a string representation of this instance to <out>.
  */
 void PhysicsManager::
-write_linear_forces(ostream &out, unsigned int indent) const {
+write_linear_forces(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent);
   out<<""<<"_linear_forces ("<<_linear_forces.size()<<" forces)\n";
@@ -222,7 +222,7 @@ write_linear_forces(ostream &out, unsigned int indent) const {
  * Write a string representation of this instance to <out>.
  */
 void PhysicsManager::
-write_angular_forces(ostream &out, unsigned int indent) const {
+write_angular_forces(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent);
   out<<""<<"_angular_forces ("<<_angular_forces.size()<<" forces)\n";
@@ -238,7 +238,7 @@ write_angular_forces(ostream &out, unsigned int indent) const {
  * Write a string representation of this instance to <out>.
  */
 void PhysicsManager::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""<<"PhysicsManager:\n";
   if (indent>20) {
@@ -268,7 +268,7 @@ write(ostream &out, unsigned int indent) const {
  * Write a string representation of this instance to <out>.
  */
 void PhysicsManager::
-debug_output(ostream &out, unsigned int indent) const {
+debug_output(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent); out<<""<<"PhysicsManager li"<<(_linear_integrator?1:0)<<" ai"<<(_angular_integrator?1:0)<<"\n";
   out<<"  _physicals "<<_physicals.size()<<"\n";

+ 5 - 5
panda/src/physics/physicsManager.h

@@ -72,12 +72,12 @@ PUBLISHED:
   void init_random_seed();
 
   virtual void output(ostream &out) const;
-  virtual void write_physicals(ostream &out, unsigned int indent=0) const;
-  virtual void write_linear_forces(ostream &out, unsigned int indent=0) const;
-  virtual void write_angular_forces(ostream &out, unsigned int indent=0) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write_physicals(ostream &out, int indent=0) const;
+  virtual void write_linear_forces(ostream &out, int indent=0) const;
+  virtual void write_angular_forces(ostream &out, int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
-  virtual void debug_output(ostream &out, unsigned int indent=0) const;
+  virtual void debug_output(ostream &out, int indent=0) const;
 
 public:
   friend class Physical;

+ 1 - 1
panda/src/physics/physicsObject.cxx

@@ -160,7 +160,7 @@ output(ostream &out) const {
  * Write a string representation of this instance to <out>.
  */
 void PhysicsObject::
-write(ostream &out, unsigned int indent) const {
+write(ostream &out, int indent) const {
   #ifndef NDEBUG //[
   out.width(indent);
   out<<""<<"PhysicsObject "<<_name<<"\n";

+ 1 - 1
panda/src/physics/physicsObject.h

@@ -97,7 +97,7 @@ PUBLISHED:
   #endif
 
   virtual void output(ostream &out) const;
-  virtual void write(ostream &out, unsigned int indent=0) const;
+  virtual void write(ostream &out, int indent=0) const;
 
 private:
   // physical

+ 3 - 3
panda/src/pnmimage/pnmImage.cxx

@@ -1016,9 +1016,9 @@ blend(int x, int y, float r, float g, float b, float alpha) {
     } else {
       // Blend the color with the previous color.
       LRGBColorf prev_rgb = get_xel(x, y);
-      r = r + (1.0f - alpha) * (get_red(x, y) - r);
-      g = g + (1.0f - alpha) * (get_green(x, y) - g);
-      b = b + (1.0f - alpha) * (get_blue(x, y) - b);
+      r = r + (1.0f - alpha) * (prev_rgb[0] - r);
+      g = g + (1.0f - alpha) * (prev_rgb[1] - g);
+      b = b + (1.0f - alpha) * (prev_rgb[2] - b);
       alpha = prev_alpha + alpha * (1.0f - prev_alpha);
 
       if (has_alpha()) {

+ 0 - 1
panda/src/pnmimagetypes/pnmFileTypeEXR.h

@@ -69,7 +69,6 @@ public:
 
     typedef std::vector<std::string> ChannelNames;
     ChannelNames _channel_names;
-    IMF::PixelType _best_pixel_type;
   };
 
   class Writer : public PNMWriter {

+ 0 - 12
panda/src/pnmimagetypes/pnmFileTypeJPG.h

@@ -89,18 +89,6 @@ public:
     };
     typedef struct my_error_mgr *_my_error_ptr;
     struct my_error_mgr _jerr;
-    unsigned long       pos;
-
-    unsigned long offBits;
-
-    unsigned short  cBitCount;
-    int             indexed;
-    int             classv;
-
-    pixval R[256];      /* reds */
-    pixval G[256];      /* greens */
-    pixval B[256];      /* blues */
-
     bool _is_valid;
   };
 

+ 0 - 1
panda/src/text/staticTextFont.h

@@ -55,7 +55,6 @@ private:
 
   typedef pmap<int, PT(TextGlyph)> Glyphs;
   Glyphs _glyphs;
-  PN_stdfloat _font_height;
   PT(PandaNode) _font;
   CoordinateSystem _cs;
 

+ 0 - 1
panda/src/text/textNode.h

@@ -343,7 +343,6 @@ private:
   int _max_rows;
   GeomEnums::UsageHint _usage_hint;
   int _flatten_flags;
-  bool _dynamic_merge;
   PN_stdfloat _frame_width;
   PN_stdfloat _card_border_size;
   PN_stdfloat _card_border_uv_portion;

+ 4 - 4
panda/src/tinydisplay/store_pixel.h

@@ -26,8 +26,8 @@ FNAME(store_pixel) (ZBuffer *zb, PIXEL &result, int r, int g, int b, int a) {
 
   r = STORE_PIXEL_0(fr, ((unsigned int)r * OP_A(fr, r) >> 16) + ((unsigned int)fr * OP_B(fr, r) >> 16));
   g = STORE_PIXEL_1(fg, ((unsigned int)g * OP_A(fg, g) >> 16) + ((unsigned int)fg * OP_B(fg, g) >> 16));
-  b = STORE_PIXEL_2(fg, ((unsigned int)b * OP_A(fb, b) >> 16) + ((unsigned int)fb * OP_B(fb, b) >> 16));
-  a = STORE_PIXEL_3(fg, ((unsigned int)a * OP_A(fa, a) >> 16) + ((unsigned int)fa * OP_B(fa, a) >> 16));
+  b = STORE_PIXEL_2(fb, ((unsigned int)b * OP_A(fb, b) >> 16) + ((unsigned int)fb * OP_B(fb, b) >> 16));
+  a = STORE_PIXEL_3(fa, ((unsigned int)a * OP_A(fa, a) >> 16) + ((unsigned int)fa * OP_B(fa, a) >> 16));
   result = RGBA_TO_PIXEL(r, g, b, a);
 }
 
@@ -43,8 +43,8 @@ FNAME_S(store_pixel) (ZBuffer *zb, PIXEL &result, int r, int g, int b, int a) {
 
   r = STORE_PIXEL_0(fr, ((unsigned int)r * OP_A(fr, r) >> 16) + ((unsigned int)fr * OP_B(fr, r) >> 16));
   g = STORE_PIXEL_1(fg, ((unsigned int)g * OP_A(fg, g) >> 16) + ((unsigned int)fg * OP_B(fg, g) >> 16));
-  b = STORE_PIXEL_2(fg, ((unsigned int)b * OP_A(fb, b) >> 16) + ((unsigned int)fb * OP_B(fb, b) >> 16));
-  a = STORE_PIXEL_3(fg, ((unsigned int)a * OP_A(fa, a) >> 16) + ((unsigned int)fa * OP_B(fa, a) >> 16));
+  b = STORE_PIXEL_2(fb, ((unsigned int)b * OP_A(fb, b) >> 16) + ((unsigned int)fb * OP_B(fb, b) >> 16));
+  a = STORE_PIXEL_3(fa, ((unsigned int)a * OP_A(fa, a) >> 16) + ((unsigned int)fa * OP_B(fa, a) >> 16));
   result = SRGBA_TO_PIXEL(r, g, b, a);
 }
 

+ 6 - 0
panda/src/tinydisplay/zfeatures.h

@@ -39,4 +39,10 @@
 /* Number of simultaneous texture stages supported (multitexture). */
 #define MAX_TEXTURE_STAGES 3
 
+#ifdef __GNUC__
+#define UNUSED __attribute__((unused))
+#else
+#define UNUSED
+#endif
+
 #endif /* _tgl_features_h_ */

+ 9 - 9
panda/src/tinydisplay/ztriangle_two.h

@@ -187,7 +187,7 @@ FNAME(flat_textured) (ZBuffer *zb,
     zz=z >> ZB_POINT_Z_FRAC_BITS;                                       \
     if (ZCMP(pz[_a], zz)) {                                             \
       tmp = ZB_LOOKUP_TEXTURE(texture_def, s, t, mipmap_level, mipmap_dx); \
-      int a = PALPHA_MULT(oa0, PIXEL_A(tmp));                           \
+      UNUSED int a = PALPHA_MULT(oa0, PIXEL_A(tmp));                    \
       if (ACMP(zb, a)) {                                                \
         STORE_PIX(pp[_a],                                               \
                   RGBA_TO_PIXEL(PCOMPONENT_MULT(or0, PIXEL_R(tmp)),     \
@@ -249,7 +249,7 @@ FNAME(smooth_textured) (ZBuffer *zb,
     zz=z >> ZB_POINT_Z_FRAC_BITS;                                       \
     if (ZCMP(pz[_a], zz)) {                                             \
       tmp = ZB_LOOKUP_TEXTURE(texture_def, s, t, mipmap_level, mipmap_dx); \
-      int a = PALPHA_MULT(oa1, PIXEL_A(tmp));                           \
+      UNUSED int a = PALPHA_MULT(oa1, PIXEL_A(tmp));                    \
       if (ACMP(zb, a)) {                                                \
         STORE_PIX(pp[_a],                                               \
                   RGBA_TO_PIXEL(PCOMPONENT_MULT(or1, PIXEL_R(tmp)),     \
@@ -431,7 +431,7 @@ FNAME(flat_perspective) (ZBuffer *zb,
     zz=z >> ZB_POINT_Z_FRAC_BITS;                                       \
     if (ZCMP(pz[_a], zz)) {                                             \
       tmp = ZB_LOOKUP_TEXTURE(texture_def, s, t, mipmap_level, mipmap_dx); \
-      int a = PALPHA_MULT(oa0, PIXEL_A(tmp));                           \
+      UNUSED int a = PALPHA_MULT(oa0, PIXEL_A(tmp));                    \
       if (ACMP(zb, a)) {                                                \
         STORE_PIX(pp[_a],                                               \
                   RGBA_TO_PIXEL(PCOMPONENT_MULT(or0, PIXEL_R(tmp)),     \
@@ -567,7 +567,7 @@ FNAME(smooth_perspective) (ZBuffer *zb,
     zz=z >> ZB_POINT_Z_FRAC_BITS;                                       \
     if (ZCMP(pz[_a], zz)) {                                             \
       tmp = ZB_LOOKUP_TEXTURE(texture_def, s, t, mipmap_level, mipmap_dx); \
-      int a = PALPHA_MULT(oa1, PIXEL_A(tmp));                           \
+      UNUSED int a = PALPHA_MULT(oa1, PIXEL_A(tmp));                    \
       if (ACMP(zb, a)) {                                                \
         STORE_PIX(pp[_a],                                               \
                   RGBA_TO_PIXEL(PCOMPONENT_MULT(or1, PIXEL_R(tmp)),     \
@@ -695,9 +695,9 @@ FNAME(smooth_multitex2) (ZBuffer *zb,
     zz=z >> ZB_POINT_Z_FRAC_BITS;                                       \
     if (ZCMP(pz[_a], zz)) {                                             \
       tmp = ZB_LOOKUP_TEXTURE(&zb->current_textures[0], s, t, mipmap_level, mipmap_dx); \
-      int a = PALPHA_MULT(oa1, PIXEL_A(tmp));                           \
+      UNUSED int a = PALPHA_MULT(oa1, PIXEL_A(tmp));                    \
       if (ACMP(zb, a)) {                                                \
-        int tmpa = ZB_LOOKUP_TEXTURE(&zb->current_textures[1], sa, ta, mipmap_levela, mipmap_dxa); \
+        UNUSED int tmpa = ZB_LOOKUP_TEXTURE(&zb->current_textures[1], sa, ta, mipmap_levela, mipmap_dxa); \
         STORE_PIX(pp[_a],                                               \
                   RGBA_TO_PIXEL(PCOMPONENT_MULT3(or1, PIXEL_R(tmp), PIXEL_R(tmpa)), \
                                 PCOMPONENT_MULT3(og1, PIXEL_G(tmp), PIXEL_G(tmpa)), \
@@ -853,10 +853,10 @@ FNAME(smooth_multitex3) (ZBuffer *zb,
     zz=z >> ZB_POINT_Z_FRAC_BITS;                                       \
     if (ZCMP(pz[_a], zz)) {                                             \
       tmp = ZB_LOOKUP_TEXTURE(&zb->current_textures[0], s, t, mipmap_level, mipmap_dx); \
-      int a = PALPHA_MULT(oa1, PIXEL_A(tmp));                           \
+      UNUSED int a = PALPHA_MULT(oa1, PIXEL_A(tmp));                    \
       if (ACMP(zb, a)) {                                                \
-        int tmpa = ZB_LOOKUP_TEXTURE(&zb->current_textures[1], sa, ta, mipmap_levela, mipmap_dxa); \
-        int tmpb = ZB_LOOKUP_TEXTURE(&zb->current_textures[2], sb, tb, mipmap_levelb, mipmap_dxb); \
+        UNUSED int tmpa = ZB_LOOKUP_TEXTURE(&zb->current_textures[1], sa, ta, mipmap_levela, mipmap_dxa); \
+        UNUSED int tmpb = ZB_LOOKUP_TEXTURE(&zb->current_textures[2], sb, tb, mipmap_levelb, mipmap_dxb); \
         STORE_PIX(pp[_a],                                               \
                   RGBA_TO_PIXEL(PCOMPONENT_MULT4(or1, PIXEL_R(tmp), PIXEL_R(tmpa), PIXEL_R(tmpb)), \
                                 PCOMPONENT_MULT4(og1, PIXEL_G(tmp), PIXEL_G(tmpa), PIXEL_G(tmpb)), \

+ 0 - 1
pandatool/src/egg-palettize/eggPalettize.h

@@ -62,7 +62,6 @@ private:
   bool _omitall;
   bool _redo_all;
   bool _redo_eggs;
-  bool _dont_lock_txa;
 
   bool _describe_input_file;
   bool _remove_eggs;

+ 0 - 1
pandatool/src/eggbase/eggWriter.h

@@ -40,7 +40,6 @@ protected:
 
 private:
   ofstream _output_stream;
-  ostream *_output_ptr;
 };
 
 #endif

+ 0 - 2
pandatool/src/objegg/eggToObjConverter.h

@@ -67,8 +67,6 @@ private:
                       const UniqueVertices &unique);
 
 private:
-  bool _triangulate_polygons;
-
   UniqueVertices _unique_vert3, _unique_vert4, _unique_uv2, _unique_uv3, _unique_norm;
   VertexMap _vmap;
   EggGroupNode *_current_group;

+ 0 - 1
pandatool/src/palettizer/eggFile.h

@@ -90,7 +90,6 @@ private:
   typedef pvector<TextureReference *> Textures;
   Textures _textures;
 
-  bool _noabs;
   bool _first_txa_match;
   PaletteGroups _explicitly_assigned_groups;
   PaletteGroup *_default_group;

+ 0 - 1
pandatool/src/palettizer/texturePlacement.h

@@ -127,7 +127,6 @@ private:
   // This value is only filled in while reading from the bam file; don't use
   // it otherwise.
   int _num_references;
-  int _margin_override;
   int _num_textureSwaps;
 
 public:

+ 0 - 1
pandatool/src/pfmprogs/pfmBba.h

@@ -43,7 +43,6 @@ private:
   bool _got_zero_special;
   bool _got_output_filename;
   Filename _output_filename;
-  int _reorder_index;
 };
 
 #endif