[Scummvm-cvs-logs] SF.net SVN: scummvm:[53470] scummvm/trunk/engines/agi
sev at users.sourceforge.net
sev at users.sourceforge.net
Fri Oct 15 10:49:20 CEST 2010
Revision: 53470
http://scummvm.svn.sourceforge.net/scummvm/?rev=53470&view=rev
Author: sev
Date: 2010-10-15 08:49:20 +0000 (Fri, 15 Oct 2010)
Log Message:
-----------
AGI: Fix some code analysis warnings (bug #3087825)
Modified Paths:
--------------
scummvm/trunk/engines/agi/agi.h
scummvm/trunk/engines/agi/preagi_mickey.cpp
Modified: scummvm/trunk/engines/agi/agi.h
===================================================================
--- scummvm/trunk/engines/agi/agi.h 2010-10-15 08:29:23 UTC (rev 53469)
+++ scummvm/trunk/engines/agi/agi.h 2010-10-15 08:49:20 UTC (rev 53470)
@@ -556,8 +556,8 @@
int lineUserInput; /**< line to put user input on */
int lineMinPrint; /**< num lines to print on */
int cursorPos; /**< column where the input cursor is */
- uint8 inputBuffer[40]; /**< buffer for user input */
- uint8 echoBuffer[40]; /**< buffer for echo.line */
+ byte inputBuffer[40]; /**< buffer for user input */
+ byte echoBuffer[40]; /**< buffer for echo.line */
int keypress;
InputMode inputMode; /**< keyboard input mode */
Modified: scummvm/trunk/engines/agi/preagi_mickey.cpp
===================================================================
--- scummvm/trunk/engines/agi/preagi_mickey.cpp 2010-10-15 08:29:23 UTC (rev 53469)
+++ scummvm/trunk/engines/agi/preagi_mickey.cpp 2010-10-15 08:49:20 UTC (rev 53470)
@@ -302,6 +302,8 @@
if (y != IDI_MSA_ROW_MENU_1) return;
sel = sel1;
break;
+ default:
+ return;
}
for (iWord = 0; iWord < menu.row[iRow].count; iWord++) {
@@ -1234,7 +1236,7 @@
if (!_game.nButtons)
return -1;
- for (int iPlanet = 0; iPlanet < IDI_MSA_MAX_DAT; iPlanet++) {
+ for (int iPlanet = 0; iPlanet < IDI_MSA_MAX_DAT - 1; iPlanet++) {
if (!strcmp(IDS_MSA_ADDR_PLANET[iPlanet], _game.szAddr)) {
return iPlanet;
}
@@ -1313,7 +1315,7 @@
_game.iPlanetXtal[0] = IDI_MSA_PLANET_EARTH;
_game.iPlanetXtal[8] = IDI_MSA_PLANET_URANUS;
- for (int i = 1; i < 9; i++) {
+ for (int i = 1; i < IDI_MSA_MAX_PLANET; i++) {
if (i < 8) {
do {
// Earth (planet 0) and Uranus (planet 8) are excluded
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
More information about the Scummvm-git-logs
mailing list