More warning fixes

This commit is contained in:
rdb 2018-06-01 21:49:26 +02:00
parent 213ae6b029
commit 21d8c29645
10 changed files with 12 additions and 17 deletions

View File

@ -36,7 +36,6 @@ obstacle_detection() {
double distance = 0x7fff ; double distance = 0x7fff ;
double expanded_radius = 0; double expanded_radius = 0;
LVecBase3 to_obstacle; LVecBase3 to_obstacle;
LVecBase3 prev_avoidance;
for(unsigned int i = 0; i < _ai_char->_world->_obstacles.size(); ++i) { for(unsigned int i = 0; i < _ai_char->_world->_obstacles.size(); ++i) {
PT(BoundingVolume) bounds = _ai_char->_world->_obstacles[i].get_bounds(); PT(BoundingVolume) bounds = _ai_char->_world->_obstacles[i].get_bounds();
CPT(BoundingSphere) bsphere = bounds->as_bounding_sphere(); CPT(BoundingSphere) bsphere = bounds->as_bounding_sphere();

View File

@ -517,7 +517,7 @@ static PyObject *Dtool_MappingWrapper_keys(PyObject *self, PyObject *) {
_register_collection((PyTypeObject *)&Dtool_MappingWrapper_Keys_Type, "MappingView"); _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); Py_XINCREF(wrap->_base._self);
keys->_base._self = wrap->_base._self; keys->_base._self = wrap->_base._self;
keys->_base._name = wrap->_base._name; 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"); _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); Py_XINCREF(wrap->_base._self);
values->_base._self = wrap->_base._self; values->_base._self = wrap->_base._self;
values->_base._name = wrap->_base._name; 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"); _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); Py_XINCREF(wrap->_base._self);
items->_base._self = wrap->_base._self; items->_base._self = wrap->_base._self;
items->_base._name = wrap->_base._name; 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"); _register_collection((PyTypeObject *)&Dtool_MutableSequenceWrapper_Type, "Sequence");
} }
PyObject_INIT(wrap, &Dtool_SequenceWrapper_Type); (void)PyObject_INIT(wrap, &Dtool_SequenceWrapper_Type);
Py_XINCREF(self); Py_XINCREF(self);
wrap->_base._self = self; wrap->_base._self = self;
wrap->_base._name = name; wrap->_base._name = name;
@ -1582,7 +1582,7 @@ Dtool_MutableSequenceWrapper *Dtool_NewMutableSequenceWrapper(PyObject *self, co
_register_collection((PyTypeObject *)&Dtool_MutableSequenceWrapper_Type, "MutableSequence"); _register_collection((PyTypeObject *)&Dtool_MutableSequenceWrapper_Type, "MutableSequence");
} }
PyObject_INIT(wrap, &Dtool_MutableSequenceWrapper_Type); (void)PyObject_INIT(wrap, &Dtool_MutableSequenceWrapper_Type);
Py_XINCREF(self); Py_XINCREF(self);
wrap->_base._self = self; wrap->_base._self = self;
wrap->_base._name = name; wrap->_base._name = name;
@ -1609,7 +1609,7 @@ Dtool_MappingWrapper *Dtool_NewMappingWrapper(PyObject *self, const char *name)
_register_collection((PyTypeObject *)&Dtool_MappingWrapper_Type, "Mapping"); _register_collection((PyTypeObject *)&Dtool_MappingWrapper_Type, "Mapping");
} }
PyObject_INIT(wrap, &Dtool_MappingWrapper_Type); (void)PyObject_INIT(wrap, &Dtool_MappingWrapper_Type);
Py_XINCREF(self); Py_XINCREF(self);
wrap->_base._self = self; wrap->_base._self = self;
wrap->_base._name = name; wrap->_base._name = name;
@ -1636,7 +1636,7 @@ Dtool_MappingWrapper *Dtool_NewMutableMappingWrapper(PyObject *self, const char
_register_collection((PyTypeObject *)&Dtool_MutableMappingWrapper_Type, "MutableMapping"); _register_collection((PyTypeObject *)&Dtool_MutableMappingWrapper_Type, "MutableMapping");
} }
PyObject_INIT(wrap, &Dtool_MutableMappingWrapper_Type); (void)PyObject_INIT(wrap, &Dtool_MutableMappingWrapper_Type);
Py_XINCREF(self); Py_XINCREF(self);
wrap->_base._self = self; wrap->_base._self = self;
wrap->_base._name = name; wrap->_base._name = name;

View File

@ -1355,7 +1355,7 @@ def CompileCxx(obj,src,opts):
if (optlevel==4): cmd += " -O3 -DNDEBUG" if (optlevel==4): cmd += " -O3 -DNDEBUG"
# Enable more warnings. # Enable more warnings.
cmd += " -Wall -Wno-reorder -Wno-unused-function" cmd += " -Wall -Wno-unused-function"
if not src.endswith(".c"): if not src.endswith(".c"):
cmd += " -Wno-reorder" cmd += " -Wno-reorder"

View File

@ -37,7 +37,7 @@ CocoaGraphicsPipe(CGDirectDisplayID display) : _display(display) {
_supported_types = OT_window | OT_buffer | OT_texture_buffer; _supported_types = OT_window | OT_buffer | OT_texture_buffer;
_is_valid = true; _is_valid = true;
NSAutoreleasePool *pool = [[NSAutoreleasePool alloc] init]; [[NSAutoreleasePool alloc] init];
// Put Cocoa into thread-safe mode by spawning a thread which immediately // Put Cocoa into thread-safe mode by spawning a thread which immediately
// exits. // exits.

View File

@ -405,7 +405,7 @@ open_window() {
cocoadisplay_cat.info() cocoadisplay_cat.info()
<< "os_handle type " << os_handle->get_type() << "\n"; << "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 // 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. // application, it could be either a HIViewRef or an NSView or NSWindow.

View File

@ -41,7 +41,6 @@ protected:
virtual bool open_buffer(); virtual bool open_buffer();
private: private:
X11_Display *_display;
EGLSurface _pbuffer; EGLSurface _pbuffer;
EGLDisplay _egl_display; EGLDisplay _egl_display;

View File

@ -1079,7 +1079,6 @@ update_shader_texture_bindings(ShaderContext *prev) {
for (int i = 0; i < (int)_shader->_tex_spec.size(); ++i) { for (int i = 0; i < (int)_shader->_tex_spec.size(); ++i) {
Shader::ShaderTexSpec &spec = _shader->_tex_spec[i]; Shader::ShaderTexSpec &spec = _shader->_tex_spec[i];
const InternalName *id = spec._name;
CGparameter p = _cg_parameter_map[spec._id._seqno]; CGparameter p = _cg_parameter_map[spec._id._seqno];
if (p == 0) { if (p == 0) {

View File

@ -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 // See if there is a normal map, height map, gloss map, or glow map. Also
// check if anything has TexGen. // check if anything has TexGen.

View File

@ -92,7 +92,7 @@ consider_update() {
* independently of the original. * independently of the original.
*/ */
PT(Texture) OpenCVTexture:: PT(Texture) OpenCVTexture::
make_copy_impl() { make_copy_impl() const {
Texture::CDReader cdata_tex(Texture::_cycler); Texture::CDReader cdata_tex(Texture::_cycler);
PT(OpenCVTexture) copy = new OpenCVTexture(get_name()); PT(OpenCVTexture) copy = new OpenCVTexture(get_name());
Texture::CDWriter cdata_copy_tex(copy->Texture::_cycler, true); Texture::CDWriter cdata_copy_tex(copy->Texture::_cycler, true);

View File

@ -41,7 +41,7 @@ public:
protected: protected:
virtual void consider_update(); 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, void do_assign(Texture::CData *cdata_tex, const OpenCVTexture *copy,
const Texture::CData *cdata_copy_tex); const Texture::CData *cdata_copy_tex);