[Scummvm-cvs-logs] scummvm master -> 847b9c847251f8ef0d7b7970e29efea928fc53b2

dreammaster dreammaster at scummvm.org
Sat Aug 20 13:37:09 CEST 2016


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
847b9c8472 TITANIC: Fix compiler warnings


Commit: 847b9c847251f8ef0d7b7970e29efea928fc53b2
    https://github.com/scummvm/scummvm/commit/847b9c847251f8ef0d7b7970e29efea928fc53b2
Author: Paul Gilbert (dreammaster at scummvm.org)
Date: 2016-08-20T07:36:40-04:00

Commit Message:
TITANIC: Fix compiler warnings

Changed paths:
    engines/titanic/game/chev_code.cpp
    engines/titanic/game/chev_panel.cpp
    engines/titanic/true_talk/true_talk_manager.cpp



diff --git a/engines/titanic/game/chev_code.cpp b/engines/titanic/game/chev_code.cpp
index 07225f0..0acdf57 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;
diff --git a/engines/titanic/game/chev_panel.cpp b/engines/titanic/game/chev_panel.cpp
index c644776..ed730c9 100644
--- a/engines/titanic/game/chev_panel.cpp
+++ b/engines/titanic/game/chev_panel.cpp
@@ -88,7 +88,7 @@ bool CChevPanel::MouseButtonUpMsg(CMouseButtonUpMsg *msg) {
 }
 
 bool CChevPanel::SetChevPanelBitMsg(CSetChevPanelBitMsg *msg) {
-	_chevCode = _chevCode & ~(1 << msg->_value1) | (msg->_value2 << msg->_value1);
+	_chevCode = (_chevCode & ~(1 << msg->_value1)) | (msg->_value2 << msg->_value1);
 	return true;
 }
 
diff --git a/engines/titanic/true_talk/true_talk_manager.cpp b/engines/titanic/true_talk/true_talk_manager.cpp
index 977edd5..19beee9 100644
--- a/engines/titanic/true_talk/true_talk_manager.cpp
+++ b/engines/titanic/true_talk/true_talk_manager.cpp
@@ -114,7 +114,7 @@ void CTrueTalkManager::loadStatics(SimpleFile *file) {
 	_v9 = file->readNumber();
 	_v10 = file->readNumber() != 0;
 
-	for (int idx = count; count > 10; --idx)
+	for (int idx = count; idx > 10; --idx)
 		file->readNumber();
 
 	int count2 = file->readNumber();






More information about the Scummvm-git-logs mailing list