diff options
author | Paul Gilbert | 2016-08-20 07:36:40 -0400 |
---|---|---|
committer | Paul Gilbert | 2016-08-20 07:36:40 -0400 |
commit | 847b9c847251f8ef0d7b7970e29efea928fc53b2 (patch) | |
tree | cdf689e3426bf504cf6568dd97b2c1e5c2d01529 /engines/titanic/game/chev_code.cpp | |
parent | fdd4e8369a1dfd8726b533f74b80bb414db0e612 (diff) | |
download | scummvm-rg350-847b9c847251f8ef0d7b7970e29efea928fc53b2.tar.gz scummvm-rg350-847b9c847251f8ef0d7b7970e29efea928fc53b2.tar.bz2 scummvm-rg350-847b9c847251f8ef0d7b7970e29efea928fc53b2.zip |
TITANIC: Fix compiler warnings
Diffstat (limited to 'engines/titanic/game/chev_code.cpp')
-rw-r--r-- | engines/titanic/game/chev_code.cpp | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/engines/titanic/game/chev_code.cpp b/engines/titanic/game/chev_code.cpp index 07225f0cf8..0acdf575f4 100644 --- a/engines/titanic/game/chev_code.cpp +++ b/engines/titanic/game/chev_code.cpp @@ -70,7 +70,7 @@ bool CChevCode::SetChevFloorBits(CSetChevFloorBits *msg) { int index = (msg->_floorNum + 4) % 10; _chevCode &= ~0xFF00; - int val; + int val = 0; switch (section) { case 0: val = 144; @@ -101,7 +101,7 @@ bool CChevCode::SetChevRoomBits(CSetChevRoomBits *msg) { } bool CChevCode::GetChevLiftNum(CGetChevLiftNum *msg) { - msg->_liftNum = (_chevCode >> 18) & 3 + 1; + msg->_liftNum = ((_chevCode >> 18) & 3) + 1; return true; } @@ -112,7 +112,7 @@ bool CChevCode::GetChevClassNum(CGetChevClassNum *msg) { bool CChevCode::GetChevFloorNum(CGetChevFloorNum *msg) { int val1 = (_chevCode >> 8) & 0xF; - int val2 = (_chevCode >> 12) & 0xF - 9; + int val2 = ((_chevCode >> 12) & 0xF) - 9; switch (val2) { case 0: @@ -148,7 +148,7 @@ bool CChevCode::CheckChevCode(CCheckChevCode *msg) { CGetChevRoomNum getRoomMsg; CString roomName; int classNum = 0; - uint bits; + uint bits = 0; if (_chevCode & 1) { switch (_chevCode) { @@ -252,7 +252,6 @@ bool CChevCode::CheckChevCode(CCheckChevCode *msg) { break; } } - // TODO } msg->_classNum = classNum; |