[Scummvm-cvs-logs] scummvm master -> dd849ac5b77a238917cf970c0b1d842be79409e3

wjp wjp at usecode.org
Fri Oct 10 14:12:33 CEST 2014


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:
dd849ac5b7 PRINCE: Fix more warnings


Commit: dd849ac5b77a238917cf970c0b1d842be79409e3
    https://github.com/scummvm/scummvm/commit/dd849ac5b77a238917cf970c0b1d842be79409e3
Author: Willem Jan Palenstijn (Willem.Jan.Palenstijn at cwi.nl)
Date: 2014-10-10T14:11:43+02:00

Commit Message:
PRINCE: Fix more warnings

Changed paths:
    engines/prince/prince.cpp
    engines/prince/prince.h
    engines/prince/script.cpp



diff --git a/engines/prince/prince.cpp b/engines/prince/prince.cpp
index b5a652e..78de9a8 100644
--- a/engines/prince/prince.cpp
+++ b/engines/prince/prince.cpp
@@ -600,7 +600,7 @@ void PrinceEngine::makeInvCursor(int itemNr) {
 	_cursor2->fillRect(cur2Rect, 255);
 	_cursor2->copyRectToSurface(*cur1Surface, 0, 0, cur1Rect);
 
-	byte *src1 = (byte *)itemSurface->getBasePtr(0, 0);
+	const byte *src1 = (const byte *)itemSurface->getBasePtr(0, 0);
 	byte *dst1 = (byte *)_cursor2->getBasePtr(cur1W, cur1H);
 
 	if (itemH % 2) {
@@ -611,7 +611,7 @@ void PrinceEngine::makeInvCursor(int itemNr) {
 	}
 
 	for (int y = 0; y < itemH; y++) {
-		byte *src2 = src1;
+		const byte *src2 = src1;
 		byte *dst2 = dst1;
 		if (y % 2 == 0) {
 			for (int x = 0; x < itemW; x++, src2++) {
@@ -2604,6 +2604,8 @@ void PrinceEngine::checkOptions() {
 			case Common::EN_ANY:
 				optText = optionsTextEN[i];
 				break;
+			default:
+				break;
 			};
 			uint16 textW = getTextWidth(optText.c_str());
 			uint16 textX = _optionsX + _optionsWidth / 2 - textW / 2;
@@ -2651,6 +2653,8 @@ void PrinceEngine::checkInvOptions() {
 			case Common::EN_ANY:
 				invText = invOptionsTextEN[i];
 				break;
+			default:
+				break;
 			};
 			uint16 textW = getTextWidth(invText.c_str());
 			uint16 textX = _optionsX + _invOptionsWidth / 2 - textW / 2;
diff --git a/engines/prince/prince.h b/engines/prince/prince.h
index bc258cb..9e892f1 100644
--- a/engines/prince/prince.h
+++ b/engines/prince/prince.h
@@ -649,7 +649,7 @@ private:
 	Font *_font;
 	MusicPlayer *_midiPlayer;
 
-	static const uint32 kMaxSamples = 60;
+	static const int kMaxSamples = 60;
 	Audio::RewindableAudioStream *_audioStream[kMaxSamples];
 	Audio::SoundHandle _soundHandle[kMaxSamples];
 
diff --git a/engines/prince/script.cpp b/engines/prince/script.cpp
index 8f1aa9f..b778bd3 100644
--- a/engines/prince/script.cpp
+++ b/engines/prince/script.cpp
@@ -1883,7 +1883,7 @@ void Interpreter::O_VIEWFLCLOOP() {
 
 // Not used in script
 void Interpreter::O_FLCSPEED() {
-	error("O_FLCSPEED speed %d");
+	error("O_FLCSPEED speed");
 }
 
 void Interpreter::O_OPENINVENTORY() {






More information about the Scummvm-git-logs mailing list