Attempted fix for several GCC warnings.
This commit is contained in:
parent
da75907942
commit
aaddc98b46
@ -677,6 +677,11 @@ void cLuaState::Push(void * a_Ptr)
|
||||
{
|
||||
ASSERT(IsValid());
|
||||
|
||||
// Investigate the cause of this - what is the callstack?
|
||||
LOGWARNING("Lua engine encountered an error - attempting to push a plain pointer");
|
||||
LogStackTrace();
|
||||
ASSERT(!"A plain pointer should never be pushed on Lua stack");
|
||||
|
||||
lua_pushnil(m_LuaState);
|
||||
m_NumCurrentFunctionArgs += 1;
|
||||
}
|
||||
@ -1265,6 +1270,8 @@ void cLuaState::LogStack(const char * a_Header)
|
||||
|
||||
void cLuaState::LogStack(lua_State * a_LuaState, const char * a_Header)
|
||||
{
|
||||
UNUSED(a_Header); // The param seems unused when compiling for release, so the compiler warns
|
||||
|
||||
LOGD((a_Header != NULL) ? a_Header : "Lua C API Stack contents:");
|
||||
for (int i = lua_gettop(a_LuaState); i > 0; i--)
|
||||
{
|
||||
|
@ -1321,6 +1321,8 @@ static int tolua_cPluginManager_ForEachCommand(lua_State * tolua_S)
|
||||
private:
|
||||
virtual bool Command(const AString & a_Command, const cPlugin * a_Plugin, const AString & a_Permission, const AString & a_HelpString) override
|
||||
{
|
||||
UNUSED(a_Plugin);
|
||||
|
||||
lua_rawgeti(LuaState, LUA_REGISTRYINDEX, FuncRef); /* Push function reference */
|
||||
tolua_pushcppstring(LuaState, a_Command);
|
||||
tolua_pushcppstring(LuaState, a_Permission);
|
||||
@ -1396,6 +1398,9 @@ static int tolua_cPluginManager_ForEachConsoleCommand(lua_State * tolua_S)
|
||||
private:
|
||||
virtual bool Command(const AString & a_Command, const cPlugin * a_Plugin, const AString & a_Permission, const AString & a_HelpString) override
|
||||
{
|
||||
UNUSED(a_Plugin);
|
||||
UNUSED(a_Permission);
|
||||
|
||||
lua_rawgeti(LuaState, LUA_REGISTRYINDEX, FuncRef); /* Push function reference */
|
||||
tolua_pushcppstring(LuaState, a_Command);
|
||||
tolua_pushcppstring(LuaState, a_HelpString);
|
||||
|
@ -207,7 +207,7 @@ inline void MTRand::seed( uint32 *const bigSeed, const uint32 seedLength )
|
||||
initialize(19650218UL);
|
||||
int i = 1;
|
||||
uint32 j = 0;
|
||||
int k = ( N > seedLength ? N : seedLength );
|
||||
int k = ( (uint32)N > seedLength ? (uint32)N : seedLength );
|
||||
for( ; k; --k )
|
||||
{
|
||||
state[i] =
|
||||
|
Loading…
Reference in New Issue
Block a user