diff --git a/contrib/src/ai/obstacleAvoidance.cxx b/contrib/src/ai/obstacleAvoidance.cxx index faf8a1ff05..87ce79026b 100644 --- a/contrib/src/ai/obstacleAvoidance.cxx +++ b/contrib/src/ai/obstacleAvoidance.cxx @@ -36,7 +36,6 @@ obstacle_detection() { double distance = 0x7fff ; double expanded_radius = 0; LVecBase3 to_obstacle; - LVecBase3 prev_avoidance; for(unsigned int i = 0; i < _ai_char->_world->_obstacles.size(); ++i) { PT(BoundingVolume) bounds = _ai_char->_world->_obstacles[i].get_bounds(); CPT(BoundingSphere) bsphere = bounds->as_bounding_sphere(); diff --git a/dtool/src/interrogatedb/py_wrappers.cxx b/dtool/src/interrogatedb/py_wrappers.cxx index 4d56eee41a..3e8f61cb39 100644 --- a/dtool/src/interrogatedb/py_wrappers.cxx +++ b/dtool/src/interrogatedb/py_wrappers.cxx @@ -517,7 +517,7 @@ static PyObject *Dtool_MappingWrapper_keys(PyObject *self, PyObject *) { _register_collection((PyTypeObject *)&Dtool_MappingWrapper_Keys_Type, "MappingView"); } - PyObject_INIT(keys, &Dtool_MappingWrapper_Keys_Type); + (void)PyObject_INIT(keys, &Dtool_MappingWrapper_Keys_Type); Py_XINCREF(wrap->_base._self); keys->_base._self = wrap->_base._self; keys->_base._name = wrap->_base._name; @@ -552,7 +552,7 @@ static PyObject *Dtool_MappingWrapper_values(PyObject *self, PyObject *) { _register_collection((PyTypeObject *)&Dtool_MappingWrapper_Values_Type, "ValuesView"); } - PyObject_INIT(values, &Dtool_MappingWrapper_Values_Type); + (void)PyObject_INIT(values, &Dtool_MappingWrapper_Values_Type); Py_XINCREF(wrap->_base._self); values->_base._self = wrap->_base._self; values->_base._name = wrap->_base._name; @@ -588,7 +588,7 @@ static PyObject *Dtool_MappingWrapper_items(PyObject *self, PyObject *) { _register_collection((PyTypeObject *)&Dtool_MappingWrapper_Items_Type, "MappingView"); } - PyObject_INIT(items, &Dtool_MappingWrapper_Items_Type); + (void)PyObject_INIT(items, &Dtool_MappingWrapper_Items_Type); Py_XINCREF(wrap->_base._self); items->_base._self = wrap->_base._self; items->_base._name = wrap->_base._name; @@ -1557,7 +1557,7 @@ Dtool_SequenceWrapper *Dtool_NewSequenceWrapper(PyObject *self, const char *name _register_collection((PyTypeObject *)&Dtool_MutableSequenceWrapper_Type, "Sequence"); } - PyObject_INIT(wrap, &Dtool_SequenceWrapper_Type); + (void)PyObject_INIT(wrap, &Dtool_SequenceWrapper_Type); Py_XINCREF(self); wrap->_base._self = self; wrap->_base._name = name; @@ -1582,7 +1582,7 @@ Dtool_MutableSequenceWrapper *Dtool_NewMutableSequenceWrapper(PyObject *self, co _register_collection((PyTypeObject *)&Dtool_MutableSequenceWrapper_Type, "MutableSequence"); } - PyObject_INIT(wrap, &Dtool_MutableSequenceWrapper_Type); + (void)PyObject_INIT(wrap, &Dtool_MutableSequenceWrapper_Type); Py_XINCREF(self); wrap->_base._self = self; wrap->_base._name = name; @@ -1609,7 +1609,7 @@ Dtool_MappingWrapper *Dtool_NewMappingWrapper(PyObject *self, const char *name) _register_collection((PyTypeObject *)&Dtool_MappingWrapper_Type, "Mapping"); } - PyObject_INIT(wrap, &Dtool_MappingWrapper_Type); + (void)PyObject_INIT(wrap, &Dtool_MappingWrapper_Type); Py_XINCREF(self); wrap->_base._self = self; wrap->_base._name = name; @@ -1636,7 +1636,7 @@ Dtool_MappingWrapper *Dtool_NewMutableMappingWrapper(PyObject *self, const char _register_collection((PyTypeObject *)&Dtool_MutableMappingWrapper_Type, "MutableMapping"); } - PyObject_INIT(wrap, &Dtool_MutableMappingWrapper_Type); + (void)PyObject_INIT(wrap, &Dtool_MutableMappingWrapper_Type); Py_XINCREF(self); wrap->_base._self = self; wrap->_base._name = name; diff --git a/makepanda/makepanda.py b/makepanda/makepanda.py index 40fa055bce..4a369a6f72 100755 --- a/makepanda/makepanda.py +++ b/makepanda/makepanda.py @@ -1355,7 +1355,7 @@ def CompileCxx(obj,src,opts): if (optlevel==4): cmd += " -O3 -DNDEBUG" # Enable more warnings. - cmd += " -Wall -Wno-reorder -Wno-unused-function" + cmd += " -Wall -Wno-unused-function" if not src.endswith(".c"): cmd += " -Wno-reorder" diff --git a/panda/src/cocoadisplay/cocoaGraphicsPipe.mm b/panda/src/cocoadisplay/cocoaGraphicsPipe.mm index 5430373c55..dd554e2a77 100644 --- a/panda/src/cocoadisplay/cocoaGraphicsPipe.mm +++ b/panda/src/cocoadisplay/cocoaGraphicsPipe.mm @@ -37,7 +37,7 @@ CocoaGraphicsPipe(CGDirectDisplayID display) : _display(display) { _supported_types = OT_window | OT_buffer | OT_texture_buffer; _is_valid = true; - NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; + [[NSAutoreleasePool alloc] init]; // Put Cocoa into thread-safe mode by spawning a thread which immediately // exits. diff --git a/panda/src/cocoadisplay/cocoaGraphicsWindow.mm b/panda/src/cocoadisplay/cocoaGraphicsWindow.mm index 72c9d57c0f..35f71f6614 100644 --- a/panda/src/cocoadisplay/cocoaGraphicsWindow.mm +++ b/panda/src/cocoadisplay/cocoaGraphicsWindow.mm @@ -405,7 +405,7 @@ open_window() { cocoadisplay_cat.info() << "os_handle type " << os_handle->get_type() << "\n"; - void *ptr_handle; + void *ptr_handle = nullptr; // Depending on whether the window handle comes from a Carbon or a Cocoa // application, it could be either a HIViewRef or an NSView or NSWindow. diff --git a/panda/src/egldisplay/eglGraphicsBuffer.h b/panda/src/egldisplay/eglGraphicsBuffer.h index 0d5d473d36..7bed62cb83 100644 --- a/panda/src/egldisplay/eglGraphicsBuffer.h +++ b/panda/src/egldisplay/eglGraphicsBuffer.h @@ -41,7 +41,6 @@ protected: virtual bool open_buffer(); private: - X11_Display *_display; EGLSurface _pbuffer; EGLDisplay _egl_display; diff --git a/panda/src/glstuff/glCgShaderContext_src.cxx b/panda/src/glstuff/glCgShaderContext_src.cxx index 23efd27d9a..574648300b 100644 --- a/panda/src/glstuff/glCgShaderContext_src.cxx +++ b/panda/src/glstuff/glCgShaderContext_src.cxx @@ -1079,7 +1079,6 @@ update_shader_texture_bindings(ShaderContext *prev) { for (int i = 0; i < (int)_shader->_tex_spec.size(); ++i) { Shader::ShaderTexSpec &spec = _shader->_tex_spec[i]; - const InternalName *id = spec._name; CGparameter p = _cg_parameter_map[spec._id._seqno]; if (p == 0) { diff --git a/panda/src/pgraphnodes/shaderGenerator.cxx b/panda/src/pgraphnodes/shaderGenerator.cxx index 372bd89e1d..3dea5f7134 100644 --- a/panda/src/pgraphnodes/shaderGenerator.cxx +++ b/panda/src/pgraphnodes/shaderGenerator.cxx @@ -288,8 +288,6 @@ analyze_renderstate(ShaderKey &key, const RenderState *rs) { } } - bool normal_mapping = key._lighting && shader_attrib->auto_normal_on(); - // See if there is a normal map, height map, gloss map, or glow map. Also // check if anything has TexGen. diff --git a/panda/src/vision/openCVTexture.cxx b/panda/src/vision/openCVTexture.cxx index 5990e77321..e0262d01ba 100644 --- a/panda/src/vision/openCVTexture.cxx +++ b/panda/src/vision/openCVTexture.cxx @@ -92,7 +92,7 @@ consider_update() { * independently of the original. */ PT(Texture) OpenCVTexture:: -make_copy_impl() { +make_copy_impl() const { Texture::CDReader cdata_tex(Texture::_cycler); PT(OpenCVTexture) copy = new OpenCVTexture(get_name()); Texture::CDWriter cdata_copy_tex(copy->Texture::_cycler, true); diff --git a/panda/src/vision/openCVTexture.h b/panda/src/vision/openCVTexture.h index 7226202a7f..ce4d279456 100644 --- a/panda/src/vision/openCVTexture.h +++ b/panda/src/vision/openCVTexture.h @@ -41,7 +41,7 @@ public: protected: virtual void consider_update(); - virtual PT(Texture) make_copy_impl(); + virtual PT(Texture) make_copy_impl() const; void do_assign(Texture::CData *cdata_tex, const OpenCVTexture *copy, const Texture::CData *cdata_copy_tex);