aboutsummaryrefslogtreecommitdiff
path: root/engines/wintermute/base
diff options
context:
space:
mode:
authorJohannes Schickel2014-06-08 18:52:05 +0200
committerJohannes Schickel2014-06-08 18:53:39 +0200
commitb6b6d39992c46139adb8c5c1898c8cf517e934e4 (patch)
tree2921c6c84489ebb1885ccc513e4ed6af913aff23 /engines/wintermute/base
parent257f9fd2aed29747cef578b00d6c92266c6aef56 (diff)
downloadscummvm-rg350-b6b6d39992c46139adb8c5c1898c8cf517e934e4.tar.gz
scummvm-rg350-b6b6d39992c46139adb8c5c1898c8cf517e934e4.tar.bz2
scummvm-rg350-b6b6d39992c46139adb8c5c1898c8cf517e934e4.zip
WINTERMUTE: Silence/fix some warnigns when compiling Symbian port.
See bug #6625 "WINTERMUTE: Symbian Compilation Warnings".
Diffstat (limited to 'engines/wintermute/base')
-rw-r--r--engines/wintermute/base/scriptables/script.cpp3
-rw-r--r--engines/wintermute/base/scriptables/script_ext_file.cpp2
2 files changed, 3 insertions, 2 deletions
diff --git a/engines/wintermute/base/scriptables/script.cpp b/engines/wintermute/base/scriptables/script.cpp
index f0b868209d..44fd117e61 100644
--- a/engines/wintermute/base/scriptables/script.cpp
+++ b/engines/wintermute/base/scriptables/script.cpp
@@ -488,7 +488,8 @@ double ScScript::getFloat() {
SWAP(buffer[3], buffer[4]);
#endif
- double ret = *(double *)(buffer);
+ double ret;
+ memcpy(&ret, buffer, sizeof(double));
_iP += 8; // Hardcode the double-size used originally.
return ret;
}
diff --git a/engines/wintermute/base/scriptables/script_ext_file.cpp b/engines/wintermute/base/scriptables/script_ext_file.cpp
index 36a624367c..15ddd4bcca 100644
--- a/engines/wintermute/base/scriptables/script_ext_file.cpp
+++ b/engines/wintermute/base/scriptables/script_ext_file.cpp
@@ -443,7 +443,7 @@ bool SXFile::scCallMethod(ScScript *script, ScStack *stack, ScStack *thisStack,
return STATUS_OK;
}
float val;
- (*(uint32 *)&val) = _readFile->readUint32LE();
+ WRITE_UINT32(&val, _readFile->readUint32LE());
if (!_readFile->err()) {
stack->pushFloat(val);
} else {