diff options
author | D G Turner | 2017-11-12 20:55:59 +0000 |
---|---|---|
committer | D G Turner | 2017-11-12 20:55:59 +0000 |
commit | 5199f9d080a30b4f3101d00f795ecb0557d522ab (patch) | |
tree | 42816e3eb0e07c908e8d7272e4334a9d3f6d7857 | |
parent | da870978353bd6ee151257c9c48379220aa1d7bd (diff) | |
download | scummvm-rg350-5199f9d080a30b4f3101d00f795ecb0557d522ab.tar.gz scummvm-rg350-5199f9d080a30b4f3101d00f795ecb0557d522ab.tar.bz2 scummvm-rg350-5199f9d080a30b4f3101d00f795ecb0557d522ab.zip |
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.
-rw-r--r-- | engines/sword25/util/lua/ldblib.cpp | 2 | ||||
-rw-r--r-- | engines/sword25/util/lua/loadlib.cpp | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/engines/sword25/util/lua/ldblib.cpp b/engines/sword25/util/lua/ldblib.cpp index e5cb8231c0..9ba41f1439 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 49934ce059..599e07f6c6 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_) |