aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config-file.cpp3
-rw-r--r--object.cpp2
-rw-r--r--script.cpp3
-rw-r--r--script_v1.cpp6
-rw-r--r--simon/simon.cpp4
5 files changed, 13 insertions, 5 deletions
diff --git a/config-file.cpp b/config-file.cpp
index 3049dfb55c..c753f8dadd 100644
--- a/config-file.cpp
+++ b/config-file.cpp
@@ -33,7 +33,8 @@
static char *ltrim(char *t)
{
- for (; *t && (*t == ' '); t++);
+ for (; *t && (*t == ' '); t++)
+ ;
return t;
}
diff --git a/object.cpp b/object.cpp
index 442c376f5f..c3d7c001e3 100644
--- a/object.cpp
+++ b/object.cpp
@@ -920,6 +920,7 @@ int Scumm::getInventorySlot()
return i;
}
error("Inventory full, %d max items", _maxInventoryItems);
+ return -1;
}
void Scumm::SamInventoryHack(int obj)
@@ -1281,6 +1282,7 @@ int Scumm::findFlObjectSlot()
return i;
}
error("findFlObjectSlot: Out of FLObject slots");
+ return -1;
}
void Scumm::loadFlObject(uint object, uint room)
diff --git a/script.cpp b/script.cpp
index fffcd93081..d9388b42e7 100644
--- a/script.cpp
+++ b/script.cpp
@@ -162,6 +162,7 @@ int Scumm::getScriptSlot()
return i;
}
error("Too many scripts running, %d max", NUM_SCRIPT_SLOT);
+ return -1;
}
/* Run script 'script' nested - eg, within the parent script.*/
@@ -350,6 +351,7 @@ int Scumm::readVar(uint var)
}
error("Illegal varbits (r)");
+ return -1;
}
void Scumm::writeVar(uint var, int value)
@@ -1055,6 +1057,7 @@ int Scumm::getArrayId()
return i;
}
error("Out of array pointers, %d max", _numArray);
+ return -1;
}
void Scumm::arrayop_1(int a, byte *ptr)
diff --git a/script_v1.cpp b/script_v1.cpp
index d83ce95ca8..6aae167399 100644
--- a/script_v1.cpp
+++ b/script_v1.cpp
@@ -2056,7 +2056,8 @@ void Scumm::o5_roomOps()
char buf[256], *s;
a = getVarOrDirectByte(0x80);
s = buf;
- while ((*s++ = fetchScriptByte()));
+ while ((*s++ = fetchScriptByte()))
+ ;
warning("roomops:13 save-string(%d,\"%s\") not implemented", a, buf);
break;
}
@@ -2064,7 +2065,8 @@ void Scumm::o5_roomOps()
char buf[256], *s;
a = getVarOrDirectByte(0x80);
s = buf;
- while ((*s++ = fetchScriptByte()));
+ while ((*s++ = fetchScriptByte()))
+ ;
warning("roomops:14 load-string(%d,\"%s\") not implemented", a, buf);
break;
case 15: /* palmanip? */
diff --git a/simon/simon.cpp b/simon/simon.cpp
index 15691dc84c..c490b6b1c7 100644
--- a/simon/simon.cpp
+++ b/simon/simon.cpp
@@ -6529,8 +6529,8 @@ void SimonState::o_pathfind(int x,int y,uint var_1,uint var_2) {
if (!p)
continue;
for(j=0; READ_BE_UINT16_UNALIGNED(&p[0]) != 999; j++,p+=2) { /* 0xE703 = byteswapped 999 */
- x_diff = abs(READ_BE_UINT16_UNALIGNED(&p[0]) - x);
- y_diff = abs(READ_BE_UINT16_UNALIGNED(&p[1]) - 12 - y);
+ x_diff = abs((int)(READ_BE_UINT16_UNALIGNED(&p[0]) - x));
+ y_diff = abs((int)(READ_BE_UINT16_UNALIGNED(&p[1]) - 12 - y));
if (x_diff < y_diff) {
x_diff >>= 2;