[Scummvm-git-logs] scummvm master -> 5199f9d080a30b4f3101d00f795ecb0557d522ab

digitall dgturner at iee.org
Sun Nov 12 21:54:01 CET 2017


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:
5199f9d080 SWORD25: Suppress GCC Cast Qualification Warnings.


Commit: 5199f9d080a30b4f3101d00f795ecb0557d522ab
    https://github.com/scummvm/scummvm/commit/5199f9d080a30b4f3101d00f795ecb0557d522ab
Author: D G Turner (digitall at scummvm.org)
Date: 2017-11-12T20:55:59Z

Commit Message:
SWORD25: Suppress GCC Cast Qualification Warnings.

Since lua_pushlightuserdata and lua_touserdata operate on (void *)
values, it is tricky to fix these warnings "correctly" without looking
at invasive changes to a significant amount of Lua internal code.

Since these pointers to consts are already being recast to drop the
const qualifications, then removing the const on the underlying value
declaration does not further expose this to change and stops the
compiler warnings associated with this.

Anyone with a better fix for this can restore the const
qualifications later.

Changed paths:
    engines/sword25/util/lua/ldblib.cpp
    engines/sword25/util/lua/loadlib.cpp


diff --git a/engines/sword25/util/lua/ldblib.cpp b/engines/sword25/util/lua/ldblib.cpp
index e5cb823..9ba41f1 100644
--- a/engines/sword25/util/lua/ldblib.cpp
+++ b/engines/sword25/util/lua/ldblib.cpp
@@ -204,7 +204,7 @@ static int db_setupvalue (lua_State *L) {
 
 
 
-static const char KEY_HOOK = 'h';
+static /*const*/ char KEY_HOOK = 'h';
 
 
 static void hookf (lua_State *L, lua_Debug *ar) {
diff --git a/engines/sword25/util/lua/loadlib.cpp b/engines/sword25/util/lua/loadlib.cpp
index 49934ce..599e07f 100644
--- a/engines/sword25/util/lua/loadlib.cpp
+++ b/engines/sword25/util/lua/loadlib.cpp
@@ -124,7 +124,7 @@ static int loader_preload (lua_State *L) {
 }
 
 
-static const int sentinel_ = 0;
+static /*const*/ int sentinel_ = 0;
 #define sentinel	((void *)&sentinel_)
 
 





More information about the Scummvm-git-logs mailing list