From 37e51f1575992b82a3c73536eb4bba7f9e96ed53 Mon Sep 17 00:00:00 2001 From: Max Horn Date: Tue, 8 Sep 2009 22:03:07 +0000 Subject: Fixed some (pedantic) warnings svn-id: r44015 --- engines/gob/hotspots.cpp | 3 ++- engines/gob/sound/adlib.cpp | 3 ++- engines/groovie/cursor.cpp | 2 +- engines/sci/engine/savegame.cpp | 2 +- graphics/scaler/thumbnail_intern.cpp | 2 +- 5 files changed, 7 insertions(+), 5 deletions(-) diff --git a/engines/gob/hotspots.cpp b/engines/gob/hotspots.cpp index e65ad13088..36e8244d3f 100644 --- a/engines/gob/hotspots.cpp +++ b/engines/gob/hotspots.cpp @@ -986,7 +986,8 @@ uint16 Hotspots::updateInput(uint16 xPos, uint16 yPos, uint16 width, uint16 heig ((_vm->_global->_useMouse != 0) || (_vm->_game->_forceHandleMouse != 0))) handleMouse = true; - while (_vm->_global->_pressedKeys[1] != 0); + while (_vm->_global->_pressedKeys[1] != 0) + ; continue; default: diff --git a/engines/gob/sound/adlib.cpp b/engines/gob/sound/adlib.cpp index 7ab8e1f8dd..170ed5ccf4 100644 --- a/engines/gob/sound/adlib.cpp +++ b/engines/gob/sound/adlib.cpp @@ -624,7 +624,8 @@ void MDYPlayer::interpret() { ctrlByte2 = *(_playPos++); if (ctrlByte1 != 0x7F || ctrlByte2 != 0) { _playPos -= 2; - while (*(_playPos++) != 0xF7); + while (*(_playPos++) != 0xF7) + ; } else { tempoMult = *(_playPos++); tempoFrac = *(_playPos++); diff --git a/engines/groovie/cursor.cpp b/engines/groovie/cursor.cpp index 6a91600dbb..65804a319c 100644 --- a/engines/groovie/cursor.cpp +++ b/engines/groovie/cursor.cpp @@ -297,7 +297,7 @@ void Cursor_v2::decodeFrame(byte *pal, byte *data, byte *dest) { byte ctrA = 0, ctrB = 0; - byte alpha, palIdx; + byte alpha = 0, palIdx = 0; byte r, g, b; diff --git a/engines/sci/engine/savegame.cpp b/engines/sci/engine/savegame.cpp index 87906cd7b3..6efe4e07da 100644 --- a/engines/sci/engine/savegame.cpp +++ b/engines/sci/engine/savegame.cpp @@ -203,7 +203,7 @@ void SegManager::saveLoadWithSerializer(Common::Serializer &s) { s.skip(4); // base_value while (true) { - uint32 key; + uint32 key = 0; s.syncAsSint32LE(key); if (key == INTMAPPER_MAGIC_KEY) break; diff --git a/graphics/scaler/thumbnail_intern.cpp b/graphics/scaler/thumbnail_intern.cpp index 5e0aa519e1..9b6d7d1593 100644 --- a/graphics/scaler/thumbnail_intern.cpp +++ b/graphics/scaler/thumbnail_intern.cpp @@ -111,7 +111,7 @@ static bool grabScreen565(Graphics::Surface *surf) { for (uint y = 0; y < screen->h; ++y) { for (uint x = 0; x < screen->w; ++x) { - byte r, g, b; + byte r = 0, g = 0, b = 0; if (screenFormat.bytesPerPixel == 1) { r = palette[((uint8*)screen->pixels)[y * screen->pitch + x] * 4]; -- cgit v1.2.3