From: Guus Sliepen Date: Sat, 21 Nov 2015 14:40:52 +0000 (+0100) Subject: Fix warnings from -W. X-Git-Url: https://git.mxchange.org/?a=commitdiff_plain;h=e7b735a148e426e8d4dc4c0e5a000ceff6575263;p=quix0rs-blobwars.git Fix warnings from -W. --- diff --git a/src/CGraphics.cpp b/src/CGraphics.cpp index 7dd4201..0beb6ca 100644 --- a/src/CGraphics.cpp +++ b/src/CGraphics.cpp @@ -550,11 +550,12 @@ void Graphics::loadFont(int i, const char *filename, int pointSize) } #if USEPAK + (void)filename; char tempPath[PATH_MAX]; snprintf(tempPath, sizeof tempPath, "%sfont.ttf", engine->userHomeDirectory); font[i] = TTF_OpenFont(tempPath, pointSize); #else - font[i] = TTF_OpenFont("data/vera.ttf", pointSize); + font[i] = TTF_OpenFont(filename, pointSize); #endif if (!font[i]) @@ -1087,6 +1088,9 @@ void Graphics::showLoading(int amount, int max) drawRect(120, 420, 400, 10, black, white, screen); drawRect(121, 421, currentLoading, 8, red, screen); + #else + (void)amount; + (void)max; #endif } diff --git a/src/CPak.cpp b/src/CPak.cpp index 1872fd9..7427df3 100644 --- a/src/CPak.cpp +++ b/src/CPak.cpp @@ -101,7 +101,9 @@ void Pak::setPakFile(const char *pakFilename) } fclose(pak); - + + #else + (void)pakFilename; #endif } diff --git a/src/init.cpp b/src/init.cpp index 4376c41..c3b9abc 100644 --- a/src/init.cpp +++ b/src/init.cpp @@ -209,6 +209,8 @@ void saveConfig() // int initMedalService(void *data) { + (void)data; + SDL_mutexP(medalServer.lock); char connectMessage[1024]; @@ -293,7 +295,7 @@ void initSystem() } // Increase the size of the window if we have large desktop resolutions - SDL_DisplayMode displayMode = {0}; + SDL_DisplayMode displayMode = {}; SDL_GetDesktopDisplayMode(0, &displayMode); int w = graphics.screen->w; int h = graphics.screen->h; diff --git a/src/particles.cpp b/src/particles.cpp index ea38ede..5ea2597 100644 --- a/src/particles.cpp +++ b/src/particles.cpp @@ -87,7 +87,10 @@ void addFireTrailParticle(float x, float y) void addFireParticles(float x, float y, int amount) { - map.addParticle(x + Math::rrand(-2, 2), y + Math::rrand(-2, 2), 0, 1, Math::rrand(5, 30), graphics.red, graphics.getSprite("Explosion", true), PAR_COLLIDES); + for (int i = 0 ; i < amount ; i++) + { + map.addParticle(x + Math::rrand(-2, 2), y + Math::rrand(-2, 2), 0, 1, Math::rrand(5, 30), graphics.red, graphics.getSprite("Explosion", true), PAR_COLLIDES); + } } void addBubble(float x, float y)