aboutsummaryrefslogtreecommitdiff
path: root/engines/gob/save
diff options
context:
space:
mode:
authorSven Hesse2009-08-20 20:59:22 +0000
committerSven Hesse2009-08-20 20:59:22 +0000
commit79c2dc798082c7fb9de3a90eff90cda0101acfe7 (patch)
treed09877f65a1a3e8cbfe10fea513d30ded2433859 /engines/gob/save
parentb4c7cd0484be154b2e47ece3bd5b0e0e6911d041 (diff)
downloadscummvm-rg350-79c2dc798082c7fb9de3a90eff90cda0101acfe7.tar.gz
scummvm-rg350-79c2dc798082c7fb9de3a90eff90cda0101acfe7.tar.bz2
scummvm-rg350-79c2dc798082c7fb9de3a90eff90cda0101acfe7.zip
Fixing some signed/unsigned comparison warnings
svn-id: r43570
Diffstat (limited to 'engines/gob/save')
-rw-r--r--engines/gob/save/saveload_playtoons.cpp16
-rw-r--r--engines/gob/save/saveload_v2.cpp4
-rw-r--r--engines/gob/save/saveload_v3.cpp16
-rw-r--r--engines/gob/save/saveload_v4.cpp16
-rw-r--r--engines/gob/save/saveload_v6.cpp16
5 files changed, 34 insertions, 34 deletions
diff --git a/engines/gob/save/saveload_playtoons.cpp b/engines/gob/save/saveload_playtoons.cpp
index f1140887de..a8fef3cb11 100644
--- a/engines/gob/save/saveload_playtoons.cpp
+++ b/engines/gob/save/saveload_playtoons.cpp
@@ -93,20 +93,20 @@ bool SaveLoad_Playtoons::GameHandler::load(int16 dataVar, int32 size, int32 offs
size = varSize;
}
- if (offset < kPropsSize) {
+ if (((uint32) offset) < kPropsSize) {
// Properties
- if ((offset + size) > kPropsSize) {
+ if (((uint32) (offset + size)) > kPropsSize) {
warning("Wrong index size (%d, %d)", size, offset);
return false;
}
_vm->_inter->_variables->copyFrom(dataVar, _props + offset, size);
- } else if (offset < kPropsSize + kIndexSize) {
+ } else if (((uint32) offset) < kPropsSize + kIndexSize) {
// Save index
- if (size != kIndexSize) {
+ if (((uint32) size) != kIndexSize) {
warning("Wrong index size (%d, %d)", size, offset);
return false;
}
@@ -180,20 +180,20 @@ bool SaveLoad_Playtoons::GameHandler::save(int16 dataVar, int32 size, int32 offs
size = varSize;
}
- if (offset < kPropsSize) {
+ if (((uint32) offset) < kPropsSize) {
// Properties
- if ((offset + size) > kPropsSize) {
+ if (((uint32) (offset + size)) > kPropsSize) {
warning("Wrong index size (%d, %d)", size, offset);
return false;
}
_vm->_inter->_variables->copyTo(dataVar, _props + offset, size);
- } else if (offset < kPropsSize + kIndexSize) {
+ } else if (((uint32) offset) < kPropsSize + kIndexSize) {
// Save index
- if (size != kIndexSize) {
+ if (((uint32) size) != kIndexSize) {
warning("Wrong index size (%d, %d)", size, offset);
return false;
}
diff --git a/engines/gob/save/saveload_v2.cpp b/engines/gob/save/saveload_v2.cpp
index 8449345336..ea639b861a 100644
--- a/engines/gob/save/saveload_v2.cpp
+++ b/engines/gob/save/saveload_v2.cpp
@@ -99,7 +99,7 @@ bool SaveLoad_v2::GameHandler::load(int16 dataVar, int32 size, int32 offset) {
if (offset == 0) {
// Save index
- if (size != kIndexSize) {
+ if (((uint32) size) != kIndexSize) {
warning("Requested index has wrong size (%d)", size);
return false;
}
@@ -184,7 +184,7 @@ bool SaveLoad_v2::GameHandler::save(int16 dataVar, int32 size, int32 offset) {
if (offset == 0) {
// Save index
- if (size != kIndexSize) {
+ if (((uint32) size) != kIndexSize) {
warning("Requested index has wrong size (%d)", size);
return false;
}
diff --git a/engines/gob/save/saveload_v3.cpp b/engines/gob/save/saveload_v3.cpp
index 510ca622b8..064d472323 100644
--- a/engines/gob/save/saveload_v3.cpp
+++ b/engines/gob/save/saveload_v3.cpp
@@ -119,22 +119,22 @@ bool SaveLoad_v3::GameHandler::load(int16 dataVar, int32 size, int32 offset) {
size = varSize;
}
- if (offset < kPropsSize) {
+ if (((uint32) offset) < kPropsSize) {
// Global properties, like joker usage
debugC(3, kDebugSaveLoad, "Loading global properties");
- if ((size + offset) > kPropsSize) {
+ if (((uint32) (offset + size)) > kPropsSize) {
warning("Wrong global properties list size (%d, %d)", size, offset);
return false;
}
_vm->_inter->_variables->copyFrom(dataVar, _props + offset, size);
- } else if (offset == kPropsSize) {
+ } else if (((uint32) offset) == kPropsSize) {
// Save index
- if (size != kIndexSize) {
+ if (((uint32) size) != kIndexSize) {
warning("Requested index has wrong size (%d)", size);
return false;
}
@@ -193,22 +193,22 @@ bool SaveLoad_v3::GameHandler::save(int16 dataVar, int32 size, int32 offset) {
size = varSize;
}
- if (offset < kPropsSize) {
+ if (((uint32) offset) < kPropsSize) {
// Global properties, like joker usage
debugC(3, kDebugSaveLoad, "Saving global properties");
- if ((size + offset) > kPropsSize) {
+ if (((uint32) (offset + size)) > kPropsSize) {
warning("Wrong global properties list size (%d, %d)", size, offset);
return false;
}
_vm->_inter->_variables->copyTo(dataVar, _props + offset, size);
- } else if (offset == kPropsSize) {
+ } else if (((uint32) offset) == kPropsSize) {
// Save index
- if (size != kIndexSize) {
+ if (((uint32) size) != kIndexSize) {
warning("Requested index has wrong size (%d)", size);
return false;
}
diff --git a/engines/gob/save/saveload_v4.cpp b/engines/gob/save/saveload_v4.cpp
index 66270161d3..e6973efd64 100644
--- a/engines/gob/save/saveload_v4.cpp
+++ b/engines/gob/save/saveload_v4.cpp
@@ -127,22 +127,22 @@ bool SaveLoad_v4::GameHandler::load(int16 dataVar, int32 size, int32 offset) {
size = varSize;
}
- if (offset < kPropsSize) {
+ if (((uint32) offset) < kPropsSize) {
// Global properties
debugC(3, kDebugSaveLoad, "Loading global properties");
- if ((size + offset) > kPropsSize) {
+ if (((uint32) (offset + size)) > kPropsSize) {
warning("Wrong global properties list size (%d, %d)", size, offset);
return false;
}
_vm->_inter->_variables->copyFrom(dataVar, _props + offset, size);
- } else if (offset == kPropsSize) {
+ } else if (((uint32) offset) == kPropsSize) {
// Save index
- if (size != kIndexSize) {
+ if (((uint32) size) != kIndexSize) {
warning("Requested index has wrong size (%d)", size);
return false;
}
@@ -202,22 +202,22 @@ bool SaveLoad_v4::GameHandler::save(int16 dataVar, int32 size, int32 offset) {
size = varSize;
}
- if (offset < kPropsSize) {
+ if (((uint32) offset) < kPropsSize) {
// Global properties
debugC(3, kDebugSaveLoad, "Saving global properties");
- if ((size + offset) > kPropsSize) {
+ if (((uint32) (offset + size)) > kPropsSize) {
warning("Wrong global properties list size (%d, %d)", size, offset);
return false;
}
_vm->_inter->_variables->copyTo(dataVar, _props + offset, size);
- } else if (offset == kPropsSize) {
+ } else if (((uint32) offset) == kPropsSize) {
// Save index
- if (size != kIndexSize) {
+ if (((uint32) size) != kIndexSize) {
warning("Requested index has wrong size (%d)", size);
return false;
}
diff --git a/engines/gob/save/saveload_v6.cpp b/engines/gob/save/saveload_v6.cpp
index 297f23122c..e31c8b4809 100644
--- a/engines/gob/save/saveload_v6.cpp
+++ b/engines/gob/save/saveload_v6.cpp
@@ -95,22 +95,22 @@ bool SaveLoad_v6::GameHandler::load(int16 dataVar, int32 size, int32 offset) {
size = varSize;
}
- if (offset < kPropsSize) {
+ if (((uint32) offset) < kPropsSize) {
// Properties
refreshProps();
- if ((offset + size) > kPropsSize) {
+ if (((uint32) (offset + size)) > kPropsSize) {
warning("Wrong index size (%d, %d)", size, offset);
return false;
}
_vm->_inter->_variables->copyFrom(dataVar, _props + offset, size);
- } else if (offset < kPropsSize + kIndexSize) {
+ } else if (((uint32) offset) < kPropsSize + kIndexSize) {
// Save index
- if (size != kIndexSize) {
+ if (((uint32) size) != kIndexSize) {
warning("Wrong index size (%d, %d)", size, offset);
return false;
}
@@ -191,10 +191,10 @@ bool SaveLoad_v6::GameHandler::save(int16 dataVar, int32 size, int32 offset) {
size = varSize;
}
- if (offset < kPropsSize) {
+ if (((uint32) offset) < kPropsSize) {
// Properties
- if ((offset + size) > kPropsSize) {
+ if (((uint32) (offset + size)) > kPropsSize) {
warning("Wrong index size (%d, %d)", size, offset);
return false;
}
@@ -203,10 +203,10 @@ bool SaveLoad_v6::GameHandler::save(int16 dataVar, int32 size, int32 offset) {
refreshProps();
- } else if (offset < kPropsSize + kIndexSize) {
+ } else if (((uint32) offset) < kPropsSize + kIndexSize) {
// Save index
- if (size != kIndexSize) {
+ if (((uint32) size) != kIndexSize) {
warning("Wrong index size (%d, %d)", size, offset);
return false;
}