aboutsummaryrefslogtreecommitdiff
path: root/engines
diff options
context:
space:
mode:
authorEugene Sandulenko2010-10-15 08:49:20 +0000
committerEugene Sandulenko2010-10-15 08:49:20 +0000
commit764eaa554ce2633e9a927f7264ff3ca57ee5650d (patch)
tree322a3afc18b8eeef4f878a5a877615c7786ea791 /engines
parent63cb05135142a55a542d1bc0d65093017c6d73d2 (diff)
downloadscummvm-rg350-764eaa554ce2633e9a927f7264ff3ca57ee5650d.tar.gz
scummvm-rg350-764eaa554ce2633e9a927f7264ff3ca57ee5650d.tar.bz2
scummvm-rg350-764eaa554ce2633e9a927f7264ff3ca57ee5650d.zip
AGI: Fix some code analysis warnings (bug #3087825)
svn-id: r53470
Diffstat (limited to 'engines')
-rw-r--r--engines/agi/agi.h4
-rw-r--r--engines/agi/preagi_mickey.cpp6
2 files changed, 6 insertions, 4 deletions
diff --git a/engines/agi/agi.h b/engines/agi/agi.h
index 4df8824b0e..e991345040 100644
--- a/engines/agi/agi.h
+++ b/engines/agi/agi.h
@@ -556,8 +556,8 @@ struct AgiGame {
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 */
diff --git a/engines/agi/preagi_mickey.cpp b/engines/agi/preagi_mickey.cpp
index ec8a1f4878..ea041a93c7 100644
--- a/engines/agi/preagi_mickey.cpp
+++ b/engines/agi/preagi_mickey.cpp
@@ -302,6 +302,8 @@ void Mickey::getMouseMenuSelRow(MSA_MENU menu, int *sel0, int *sel1, int iRow, i
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 @@ int Mickey::getPlanet() {
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 @@ void Mickey::flipSwitch() {
_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