From b6b6d39992c46139adb8c5c1898c8cf517e934e4 Mon Sep 17 00:00:00 2001 From: Johannes Schickel Date: Sun, 8 Jun 2014 18:52:05 +0200 Subject: WINTERMUTE: Silence/fix some warnigns when compiling Symbian port. See bug #6625 "WINTERMUTE: Symbian Compilation Warnings". --- engines/wintermute/base/scriptables/script.cpp | 3 ++- engines/wintermute/base/scriptables/script_ext_file.cpp | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) (limited to 'engines/wintermute/base') 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 { -- cgit v1.2.3