From 306c58e7ed73fac7bc478b9642c4386d1e8c6dfb Mon Sep 17 00:00:00 2001 From: Torsten Dreyer Date: Sun, 25 Dec 2011 20:28:38 +0100 Subject: [PATCH] Some more trivial warning fixes --- simgear/environment/metar.hxx | 4 ++-- simgear/math/SGBox.hxx | 2 +- simgear/math/sg_random.h | 2 +- simgear/screen/tr.cxx | 8 +++++--- simgear/xml/xmlparse.c | 2 +- simgear/xml/xmlparse.h | 2 +- 6 files changed, 11 insertions(+), 9 deletions(-) diff --git a/simgear/environment/metar.hxx b/simgear/environment/metar.hxx index 26e8523e..2f2e5d02 100644 --- a/simgear/environment/metar.hxx +++ b/simgear/environment/metar.hxx @@ -101,7 +101,7 @@ public: inline double getFriction() const { return _friction; } inline const char *getFrictionString() const { return _friction_string; } inline const char *getComment() const { return _comment; } - inline const bool getWindShear() const { return _wind_shear; } + inline bool getWindShear() const { return _wind_shear; } inline const SGMetarVisibility& getMinVisibility() const { return _min_visibility; } inline const SGMetarVisibility& getMaxVisibility() const { return _max_visibility; } @@ -188,7 +188,7 @@ public: inline const char *getData() const { return _data; } inline const char *getUnusedData() const { return _m; } - inline const bool getProxy() const { return _x_proxy; } + inline bool getProxy() const { return _x_proxy; } inline const char *getId() const { return _icao; } inline int getYear() const { return _year; } inline int getMonth() const { return _month; } diff --git a/simgear/math/SGBox.hxx b/simgear/math/SGBox.hxx index dfa50275..f63eef24 100644 --- a/simgear/math/SGBox.hxx +++ b/simgear/math/SGBox.hxx @@ -97,7 +97,7 @@ public: return (_max[0] - _min[0])*(_max[1] - _min[1])*(_max[2] - _min[2]); } - const bool empty() const + bool empty() const { return !valid(); } bool valid() const diff --git a/simgear/math/sg_random.h b/simgear/math/sg_random.h index 1fed733d..51fefb65 100644 --- a/simgear/math/sg_random.h +++ b/simgear/math/sg_random.h @@ -40,7 +40,7 @@ extern "C" { * Structure to hold MT algorithm state to easily allow independant * sets of random numbers with different seeds. */ -struct {unsigned int array[MT_N]; int index; } typedef mt; +typedef struct {unsigned int array[MT_N]; int index; } mt; /** * Initialize a new MT state with a given seed. diff --git a/simgear/screen/tr.cxx b/simgear/screen/tr.cxx index fd64d7cb..e6d8bd7e 100644 --- a/simgear/screen/tr.cxx +++ b/simgear/screen/tr.cxx @@ -408,7 +408,7 @@ void trBeginTile(TRcontext *tr) { GLint matrixMode; GLint tileWidth, tileHeight, border; - GLdouble left, right, bottom, top; +// GLdouble left, right, bottom, top; if (!tr) return; @@ -459,7 +459,9 @@ void trBeginTile(TRcontext *tr) glMatrixMode(GL_PROJECTION); glLoadIdentity(); + // OSGFIXME /* compute projection parameters */ + /* left = tr->Left + (tr->Right - tr->Left) * (tr->CurrentColumn * tr->TileWidthNB - border) / tr->ImageWidth; right = left + (tr->Right - tr->Left) * tileWidth / tr->ImageWidth; @@ -467,8 +469,8 @@ void trBeginTile(TRcontext *tr) * (tr->CurrentRow * tr->TileHeightNB - border) / tr->ImageHeight; top = bottom + (tr->Top - tr->Bottom) * tileHeight / tr->ImageHeight; - // OSGFIXME -// ssgSetFrustum ( left, right, bottom, top, tr->Near, tr->Far ); + ssgSetFrustum ( left, right, bottom, top, tr->Near, tr->Far ); + */ /* restore user's matrix mode */ glMatrixMode( (GLenum)matrixMode ); diff --git a/simgear/xml/xmlparse.c b/simgear/xml/xmlparse.c index 294b73b4..c40dce07 100644 --- a/simgear/xml/xmlparse.c +++ b/simgear/xml/xmlparse.c @@ -911,7 +911,7 @@ void XML_DefaultCurrent(XML_Parser parser) } } -const XML_LChar *XML_ErrorString(int code) +const XML_LChar *XML_ErrorString(size_t code) { static const XML_LChar *message[] = { 0, diff --git a/simgear/xml/xmlparse.h b/simgear/xml/xmlparse.h index f2f9c9be..123afdf9 100644 --- a/simgear/xml/xmlparse.h +++ b/simgear/xml/xmlparse.h @@ -473,7 +473,7 @@ void XMLPARSEAPI XML_ParserFree(XML_Parser parser); /* Returns a string describing the error. */ -const XML_LChar XMLPARSEAPI *XML_ErrorString(int code); +const XML_LChar XMLPARSEAPI *XML_ErrorString(size_t code); #ifdef __cplusplus }