fixed a ridiculous number of gcc warnings, nearly all of which were complaints about unused parameters - the remaining 199 warnings I get are from code that isn't ours (box2d is responsible for all but 8 of them)

This commit is contained in:
Bill Meltsner
2010-02-26 03:55:21 -05:00
parent dbf8301f24
commit 7c33786100
13 changed files with 153 additions and 142 deletions
@@ -593,6 +593,7 @@
A9B4BA991045937F001DBC80 /* wrap_ParticleSystem.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = wrap_ParticleSystem.h; sourceTree = "<group>"; };
A9B4BA9A1045937F001DBC80 /* ParticleSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ParticleSystem.cpp; sourceTree = "<group>"; };
A9B4BA9B1045937F001DBC80 /* wrap_ParticleSystem.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = wrap_ParticleSystem.cpp; sourceTree = "<group>"; };
A9BFAA851137C1CE005FE0AD /* ThreadModule.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ThreadModule.h; sourceTree = "<group>"; };
A9CF0E8410B9EB1000E6F37E /* utf8.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = utf8.h; sourceTree = "<group>"; };
A9CF0E8510B9EB1000E6F37E /* utf8.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = utf8.cpp; sourceTree = "<group>"; };
A9D307E9106635C3004FEDF8 /* physfs.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = physfs.framework; path = /Library/Frameworks/physfs.framework; sourceTree = "<absolute>"; };
@@ -1393,6 +1394,7 @@
A986DEAF113249A700810279 /* thread */ = {
isa = PBXGroup;
children = (
A9BFAA851137C1CE005FE0AD /* ThreadModule.h */,
A986DEB0113249A800810279 /* sdl */,
);
path = thread;
@@ -1782,6 +1784,8 @@
GCC_WARN_SHADOW = NO;
GCC_WARN_SIGN_COMPARE = YES;
GCC_WARN_TYPECHECK_CALLS_TO_PRINTF = NO;
GCC_WARN_UNUSED_PARAMETER = NO;
GCC_WARN_UNUSED_VALUE = NO;
GCC_WARN_UNUSED_VARIABLE = YES;
HEADER_SEARCH_PATHS = (
/Library/Frameworks/Lua.framework/Headers,
+1 -1
View File
@@ -264,7 +264,7 @@ namespace love
* @param type The type bit.
**/
template <typename T>
T * luax_totype(lua_State * L, int idx, const char * name, love::bits type)
T * luax_totype(lua_State * L, int idx, const char *, love::bits)
{
return (T*)(((Proxy *)lua_touserdata(L, idx))->data);
}
+13 -13
View File
@@ -39,12 +39,12 @@ namespace null
return "love.audio.null";
}
love::audio::Source * Audio::newSource(love::sound::Decoder * decoder)
love::audio::Source * Audio::newSource(love::sound::Decoder *)
{
return new Source();
}
love::audio::Source * Audio::newSource(love::sound::SoundData * soundData)
love::audio::Source * Audio::newSource(love::sound::SoundData *)
{
return new Source();
}
@@ -59,7 +59,7 @@ namespace null
return 0;
}
void Audio::play(love::audio::Source * source)
void Audio::play(love::audio::Source *)
{
}
@@ -67,7 +67,7 @@ namespace null
{
}
void Audio::stop(love::audio::Source * source)
void Audio::stop(love::audio::Source *)
{
}
@@ -75,7 +75,7 @@ namespace null
{
}
void Audio::pause(love::audio::Source * source)
void Audio::pause(love::audio::Source *)
{
}
@@ -83,7 +83,7 @@ namespace null
{
}
void Audio::resume(love::audio::Source * source)
void Audio::resume(love::audio::Source *)
{
}
@@ -91,7 +91,7 @@ namespace null
{
}
void Audio::rewind(love::audio::Source * source)
void Audio::rewind(love::audio::Source *)
{
}
@@ -109,27 +109,27 @@ namespace null
return volume;
}
void Audio::getPosition(float * v) const
void Audio::getPosition(float *) const
{
}
void Audio::setPosition(float * v)
void Audio::setPosition(float *)
{
}
void Audio::getOrientation(float * v) const
void Audio::getOrientation(float *) const
{
}
void Audio::setOrientation(float * v)
void Audio::setOrientation(float *)
{
}
void Audio::getVelocity(float * v) const
void Audio::getVelocity(float *) const
{
}
void Audio::setVelocity(float * v)
void Audio::setVelocity(float *)
{
}
+6 -6
View File
@@ -96,27 +96,27 @@ namespace null
return volume;
}
void Source::setPosition(float * v)
void Source::setPosition(float *)
{
}
void Source::getPosition(float * v) const
void Source::getPosition(float *) const
{
}
void Source::setVelocity(float * v)
void Source::setVelocity(float *)
{
}
void Source::getVelocity(float * v) const
void Source::getVelocity(float *) const
{
}
void Source::setDirection(float * v)
void Source::setDirection(float *)
{
}
void Source::getDirection(float * v) const
void Source::getDirection(float *) const
{
}
+1 -1
View File
@@ -132,7 +132,7 @@ namespace sdl
return 0;
}
int w_pump(lua_State * L)
int w_pump(lua_State *)
{
instance->pump();
return 0;
+2 -2
View File
@@ -27,7 +27,7 @@ namespace love
{
namespace font
{
ImageRasterizer::ImageRasterizer(love::image::ImageData * data, unsigned short * glyphs)
ImageRasterizer::ImageRasterizer(love::image::ImageData * data, unsigned short *)
: imageData(data)
{
imageData->retain();
@@ -43,7 +43,7 @@ namespace font
return getHeight();
}
GlyphData * ImageRasterizer::getGlyphData(unsigned short glyph) const
GlyphData * ImageRasterizer::getGlyphData(unsigned short) const
{
return 0;
}
+3 -2
View File
@@ -38,7 +38,8 @@ namespace opengl
currentMode.height = 0;
// Window should be centered.
SDL_putenv("SDL_VIDEO_CENTERED=center");
char * center = "SDL_VIDEO_CENTERED=center";
SDL_putenv(center);
if(SDL_InitSubSystem(SDL_INIT_VIDEO) < 0)
throw Exception(SDL_GetError());
@@ -423,7 +424,7 @@ namespace opengl
return font;
}
Font * Graphics::newImageFont(Image * image, const char * glyphs, float spacing)
Font * Graphics::newImageFont(Image * image, const char * glyphs, float)
{
Font * font = new ImageFont(image, std::string(glyphs));
@@ -58,19 +58,19 @@ namespace opengl
return 1;
}
int w_reset(lua_State * L)
int w_reset(lua_State *)
{
instance->reset();
return 0;
}
int w_clear(lua_State * L)
int w_clear(lua_State *)
{
instance->clear();
return 0;
}
int w_present(lua_State * L)
int w_present(lua_State *)
{
instance->present();
return 0;
@@ -748,13 +748,13 @@ namespace opengl
return instance->polygon(L);
}
int w_push(lua_State * L)
int w_push(lua_State *)
{
instance->push();
return 0;
}
int w_pop(lua_State * L)
int w_pop(lua_State *)
{
instance->pop();
return 0;
+1 -1
View File
@@ -34,7 +34,7 @@ namespace lullaby
bool Mpg123Decoder::inited = false;
Mpg123Decoder::Mpg123Decoder(Data * data, const std::string & ext, int bufferSize, int sampleRate)
: Decoder(data, ext, bufferSize, sampleRate), channels(MPG123_STEREO), handle(0)
: Decoder(data, ext, bufferSize, sampleRate), handle(0), channels(MPG123_STEREO)
{
data_size = data->getSize();
+1 -1
View File
@@ -33,7 +33,7 @@ namespace lullaby
/**
* CALLBACK FUNCTIONS
**/
int vorbisClose(void * datasource /* ptr to the data that the vorbis files need*/)
int vorbisClose(void * /* ptr to the data that the vorbis files need*/)
{
// Does nothing (handled elsewhere)
return 1;
+9 -3
View File
@@ -86,11 +86,13 @@ namespace sdl
lua_pushlightuserdata(L, v->data.userdata);
break;
case FUSERDATA:
const char *name;
{
const char *name = NULL;
love::types.find(v->udatatype, name);
((love::Object *) v->data.userdata)->retain();
luax_newtype(L, name, v->flags, v->data.userdata);
break;
}
default:
lua_pushnil(L);
break;
@@ -126,11 +128,13 @@ namespace sdl
lua_pushlightuserdata(L, v->data.userdata);
break;
case FUSERDATA:
const char *name;
{
const char *name = NULL;
types.find(v->udatatype, name);
((love::Object *) v->data.userdata)->retain();
luax_newtype(L, name, v->flags, v->data.userdata);
break;
}
default:
lua_pushnil(L);
break;
@@ -165,11 +169,13 @@ namespace sdl
lua_pushlightuserdata(L, v->data.userdata);
break;
case FUSERDATA:
const char *name;
{
const char *name = NULL;
types.find(v->udatatype, name);
((love::Object *) v->data.userdata)->retain();
luax_newtype(L, name, v->flags, v->data.userdata);
break;
}
default:
lua_pushnil(L);
break;
+1 -1
View File
@@ -29,7 +29,7 @@ namespace sdl
{
static Timer * instance = 0;
int w_step(lua_State * L)
int w_step(lua_State *)
{
instance->step();
return 0;