From 937bfcdd9f5922b4043e4ed648d7877c541d54cb Mon Sep 17 00:00:00 2001 From: Tobias Weimer Date: Mon, 31 Aug 2015 15:49:55 +0000 Subject: MirLua: - fixed memory corruption git-svn-id: http://svn.miranda-ng.org/main/trunk@15127 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/MirLua/src/lua/lapi.c | 2 -- plugins/MirLua/src/lua/loslib.c | 1 - plugins/MirLua/src/m_database.cpp | 2 +- 3 files changed, 1 insertion(+), 4 deletions(-) (limited to 'plugins') diff --git a/plugins/MirLua/src/lua/lapi.c b/plugins/MirLua/src/lua/lapi.c index fea9eb2765..52e7adfedc 100644 --- a/plugins/MirLua/src/lua/lapi.c +++ b/plugins/MirLua/src/lua/lapi.c @@ -1091,8 +1091,6 @@ LUA_API int lua_error (lua_State *L) { lua_lock(L); api_checknelems(L, 1); luaG_errormsg(L); - /* code unreachable; will unlock when control actually leaves the kernel */ - return 0; /* to avoid warnings */ } diff --git a/plugins/MirLua/src/lua/loslib.c b/plugins/MirLua/src/lua/loslib.c index cb8a3c3314..d747f26b90 100644 --- a/plugins/MirLua/src/lua/loslib.c +++ b/plugins/MirLua/src/lua/loslib.c @@ -232,7 +232,6 @@ static const char *checkoption (lua_State *L, const char *conv, char *buff) { } luaL_argerror(L, 1, lua_pushfstring(L, "invalid conversion specifier '%%%s'", conv)); - return conv; /* to avoid warnings */ } diff --git a/plugins/MirLua/src/m_database.cpp b/plugins/MirLua/src/m_database.cpp index 537322d5f4..9454d87664 100644 --- a/plugins/MirLua/src/m_database.cpp +++ b/plugins/MirLua/src/m_database.cpp @@ -345,7 +345,7 @@ static int lua_AllSettings(lua_State *L) const char* szModule = luaL_checkstring(L, 1); MCONTACT hContact = lua_tointeger(L, 2); - enumDBSettingsParam* param = (enumDBSettingsParam*)mir_alloc(sizeof(enumDBSettingsParam*)); + enumDBSettingsParam* param = (enumDBSettingsParam*)mir_alloc(sizeof(enumDBSettingsParam)); param->count = 0; param->pszSettingName = NULL; -- cgit v1.2.3