[Scummvm-cvs-logs] scummvm master -> b6b6d39992c46139adb8c5c1898c8cf517e934e4

lordhoto lordhoto at gmail.com
Sun Jun 8 18:54:58 CEST 2014


This automated email contains information about 1 new commit which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
b6b6d39992 WINTERMUTE: Silence/fix some warnigns when compiling Symbian port.


Commit: b6b6d39992c46139adb8c5c1898c8cf517e934e4
    https://github.com/scummvm/scummvm/commit/b6b6d39992c46139adb8c5c1898c8cf517e934e4
Author: Johannes Schickel (lordhoto at scummvm.org)
Date: 2014-06-08T18:53:39+02:00

Commit Message:
WINTERMUTE: Silence/fix some warnigns when compiling Symbian port.

See bug #6625 "WINTERMUTE: Symbian Compilation Warnings".

Changed paths:
    engines/wintermute/base/scriptables/script.cpp
    engines/wintermute/base/scriptables/script_ext_file.cpp



diff --git a/engines/wintermute/base/scriptables/script.cpp b/engines/wintermute/base/scriptables/script.cpp
index f0b8682..44fd117 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 36a6243..15ddd4b 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 {






More information about the Scummvm-git-logs mailing list