mirror of
https://github.com/Llewellynvdm/conky.git
synced 2024-11-19 11:35:12 +00:00
Merge commit '5d71853ec2da0cf37480459dcb1a398e9a1e8a03' into fix-build-with-warnings-enabled
This commit is contained in:
commit
f18c43ccfb
5
3rdparty/toluapp/.travis.yml
vendored
5
3rdparty/toluapp/.travis.yml
vendored
@ -73,15 +73,14 @@ matrix:
|
|||||||
before_install:
|
before_install:
|
||||||
- |
|
- |
|
||||||
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
if [[ "$TRAVIS_OS_NAME" == "osx" ]]; then
|
||||||
brew update;
|
HOMEBREW_NO_AUTO_UPDATE=1 brew install lua ccache;
|
||||||
brew install lua ccache;
|
|
||||||
export PATH="/usr/local/opt/ccache/libexec:$PATH";
|
export PATH="/usr/local/opt/ccache/libexec:$PATH";
|
||||||
fi
|
fi
|
||||||
- eval "${MATRIX_EVAL}"
|
- eval "${MATRIX_EVAL}"
|
||||||
# Combine global build options with OS/compiler-dependent options
|
# Combine global build options with OS/compiler-dependent options
|
||||||
- export CMAKE_OPTIONS="${CMAKE_OPTIONS} ${ENV_CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
|
- export CMAKE_OPTIONS="${CMAKE_OPTIONS} ${ENV_CMAKE_OPTIONS} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache"
|
||||||
- export CXX_FLAGS="${CXX_FLAGS} ${ENV_CXX_FLAGS} -Wall -Werror -Wextra -Wunused -pedantic"
|
- export CXX_FLAGS="${CXX_FLAGS} ${ENV_CXX_FLAGS} -Wall -Werror -Wextra -Wunused -pedantic"
|
||||||
- export C_FLAGS="${C_FLAGS} ${ENV_C_FLAGS} -Wall -Werror -Wextra -Wunused -pedantic"
|
- export C_FLAGS="${C_FLAGS} ${ENV_C_FLAGS} -Wall -Werror -Wextra -Wunused -pedantic -std=c99"
|
||||||
|
|
||||||
install:
|
install:
|
||||||
- echo ${PATH}
|
- echo ${PATH}
|
||||||
|
31
3rdparty/toluapp/src/lib/tolua_map.c
vendored
31
3rdparty/toluapp/src/lib/tolua_map.c
vendored
@ -51,16 +51,16 @@ static void mapsuper(lua_State *L, const char *name, const char *base)
|
|||||||
/* push registry.super */
|
/* push registry.super */
|
||||||
lua_pushstring(L, "tolua_super");
|
lua_pushstring(L, "tolua_super");
|
||||||
lua_rawget(L, LUA_REGISTRYINDEX); /* stack: super */
|
lua_rawget(L, LUA_REGISTRYINDEX); /* stack: super */
|
||||||
luaL_getmetatable(L, name); /* stack: super mt */
|
luaL_getmetatable(L, name); /* stack: super mt */
|
||||||
lua_rawget(L, -2); /* stack: super table */
|
lua_rawget(L, -2); /* stack: super table */
|
||||||
if (lua_isnil(L, -1))
|
if (lua_isnil(L, -1))
|
||||||
{
|
{
|
||||||
/* create table */
|
/* create table */
|
||||||
lua_pop(L, 1);
|
lua_pop(L, 1);
|
||||||
lua_newtable(L); /* stack: super table */
|
lua_newtable(L); /* stack: super table */
|
||||||
luaL_getmetatable(L, name); /* stack: super table mt */
|
luaL_getmetatable(L, name); /* stack: super table mt */
|
||||||
lua_pushvalue(L, -2); /* stack: super table mt table */
|
lua_pushvalue(L, -2); /* stack: super table mt table */
|
||||||
lua_rawset(L, -4); /* stack: super table */
|
lua_rawset(L, -4); /* stack: super table */
|
||||||
}
|
}
|
||||||
|
|
||||||
/* set base as super class */
|
/* set base as super class */
|
||||||
@ -70,7 +70,7 @@ static void mapsuper(lua_State *L, const char *name, const char *base)
|
|||||||
|
|
||||||
/* set all super class of base as super class of name */
|
/* set all super class of base as super class of name */
|
||||||
luaL_getmetatable(L, base); /* stack: super table base_mt */
|
luaL_getmetatable(L, base); /* stack: super table base_mt */
|
||||||
lua_rawget(L, -3); /* stack: super table base_table */
|
lua_rawget(L, -3); /* stack: super table base_table */
|
||||||
if (lua_istable(L, -1))
|
if (lua_istable(L, -1))
|
||||||
{
|
{
|
||||||
/* traverse base table */
|
/* traverse base table */
|
||||||
@ -79,8 +79,8 @@ static void mapsuper(lua_State *L, const char *name, const char *base)
|
|||||||
{
|
{
|
||||||
/* stack: ... base_table key value */
|
/* stack: ... base_table key value */
|
||||||
lua_pushvalue(L, -2); /* stack: ... base_table key value key */
|
lua_pushvalue(L, -2); /* stack: ... base_table key value key */
|
||||||
lua_insert(L, -2); /* stack: ... base_table key key value */
|
lua_insert(L, -2); /* stack: ... base_table key key value */
|
||||||
lua_rawset(L, -5); /* stack: ... base_table key */
|
lua_rawset(L, -5); /* stack: ... base_table key */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
lua_pop(L, 3); /* stack: <empty> */
|
lua_pop(L, 3); /* stack: <empty> */
|
||||||
@ -121,7 +121,7 @@ static void set_ubox(lua_State *L)
|
|||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
lua_pushliteral(L, "__mode");
|
lua_pushliteral(L, "__mode");
|
||||||
lua_pushliteral(L, "v");
|
lua_pushliteral(L, "v");
|
||||||
lua_rawset(L, -3); /* stack: string ubox mt */
|
lua_rawset(L, -3); /* stack: string ubox mt */
|
||||||
lua_setmetatable(L, -2); /* stack:mt basemt string ubox */
|
lua_setmetatable(L, -2); /* stack:mt basemt string ubox */
|
||||||
lua_rawset(L, -4);
|
lua_rawset(L, -4);
|
||||||
}
|
}
|
||||||
@ -330,7 +330,7 @@ TOLUA_API void tolua_open(lua_State *L)
|
|||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
lua_pushliteral(L, "__mode");
|
lua_pushliteral(L, "__mode");
|
||||||
lua_pushliteral(L, "k");
|
lua_pushliteral(L, "k");
|
||||||
lua_rawset(L, -3); /* stack: string peers mt */
|
lua_rawset(L, -3); /* stack: string peers mt */
|
||||||
lua_setmetatable(L, -2); /* stack: string peers */
|
lua_setmetatable(L, -2); /* stack: string peers */
|
||||||
lua_rawset(L, LUA_REGISTRYINDEX);
|
lua_rawset(L, LUA_REGISTRYINDEX);
|
||||||
#endif
|
#endif
|
||||||
@ -343,7 +343,7 @@ TOLUA_API void tolua_open(lua_State *L)
|
|||||||
lua_newtable(L);
|
lua_newtable(L);
|
||||||
lua_pushliteral(L, "__mode");
|
lua_pushliteral(L, "__mode");
|
||||||
lua_pushliteral(L, "v");
|
lua_pushliteral(L, "v");
|
||||||
lua_rawset(L, -3); /* stack: string ubox mt */
|
lua_rawset(L, -3); /* stack: string ubox mt */
|
||||||
lua_setmetatable(L, -2); /* stack: string ubox */
|
lua_setmetatable(L, -2); /* stack: string ubox */
|
||||||
lua_rawset(L, LUA_REGISTRYINDEX);
|
lua_rawset(L, LUA_REGISTRYINDEX);
|
||||||
|
|
||||||
@ -681,7 +681,7 @@ TOLUA_API void tolua_variable(lua_State *L, const char *name, lua_CFunction get,
|
|||||||
lua_pushstring(L, name);
|
lua_pushstring(L, name);
|
||||||
lua_pushcfunction(L, get);
|
lua_pushcfunction(L, get);
|
||||||
lua_rawset(L, -3); /* store variable */
|
lua_rawset(L, -3); /* store variable */
|
||||||
lua_pop(L, 1); /* pop .get table */
|
lua_pop(L, 1); /* pop .get table */
|
||||||
|
|
||||||
/* set func */
|
/* set func */
|
||||||
if (set)
|
if (set)
|
||||||
@ -700,7 +700,7 @@ TOLUA_API void tolua_variable(lua_State *L, const char *name, lua_CFunction get,
|
|||||||
lua_pushstring(L, name);
|
lua_pushstring(L, name);
|
||||||
lua_pushcfunction(L, set);
|
lua_pushcfunction(L, set);
|
||||||
lua_rawset(L, -3); /* store variable */
|
lua_rawset(L, -3); /* store variable */
|
||||||
lua_pop(L, 1); /* pop .set table */
|
lua_pop(L, 1); /* pop .set table */
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -742,14 +742,17 @@ TOLUA_API void tolua_array(lua_State *L, const char *name, lua_CFunction get, lu
|
|||||||
lua_rawset(L, -3);
|
lua_rawset(L, -3);
|
||||||
|
|
||||||
lua_rawset(L, -3); /* store variable */
|
lua_rawset(L, -3); /* store variable */
|
||||||
lua_pop(L, 1); /* pop .get table */
|
lua_pop(L, 1); /* pop .get table */
|
||||||
}
|
}
|
||||||
|
|
||||||
TOLUA_API void tolua_dobuffer(lua_State *L, char *B, unsigned int size, const char *name)
|
TOLUA_API void tolua_dobuffer(lua_State *L, char *B, unsigned int size, const char *name)
|
||||||
{
|
{
|
||||||
|
|
||||||
#ifdef LUA_VERSION_NUM /* lua 5.1 */
|
#ifdef LUA_VERSION_NUM /* lua 5.1 */
|
||||||
|
#pragma GCC diagnostic push
|
||||||
|
#pragma GCC diagnostic ignored "-Wunused-value"
|
||||||
luaL_loadbuffer(L, B, size, name) || lua_pcall(L, 0, 0, 0);
|
luaL_loadbuffer(L, B, size, name) || lua_pcall(L, 0, 0, 0);
|
||||||
|
#pragma GCC diagnostic pop
|
||||||
#else
|
#else
|
||||||
lua_dobuffer(L, B, size, name);
|
lua_dobuffer(L, B, size, name);
|
||||||
#endif
|
#endif
|
||||||
|
Loading…
Reference in New Issue
Block a user