From: Tim Duesterhus Date: Sat, 14 May 2022 20:15:28 +0000 (+0200) Subject: CLEANUP: Remove unused function hlua_get_top_error_string X-Git-Tag: v2.6-dev11~97 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=9b6becb3120c3a47af90f2a4fa4783a8ee30ea57;p=thirdparty%2Fhaproxy.git CLEANUP: Remove unused function hlua_get_top_error_string This function has no prototype defined in a header and is not used in hlua.c either, thus it can be safely removed. Found with -Wmissing-prototypes. --- diff --git a/src/hlua.c b/src/hlua.c index ef967a5154..abe3556b6e 100644 --- a/src/hlua.c +++ b/src/hlua.c @@ -498,16 +498,6 @@ __LJMP unsigned int hlua_checktable(lua_State *L, int argno) return luaL_ref(L, LUA_REGISTRYINDEX); } -/* Return the string that is of the top of the stack. */ -const char *hlua_get_top_error_string(lua_State *L) -{ - if (lua_gettop(L) < 1) - return "unknown error"; - if (lua_type(L, -1) != LUA_TSTRING) - return "unknown error"; - return lua_tostring(L, -1); -} - __LJMP const char *hlua_traceback(lua_State *L, const char* sep) { lua_Debug ar;