From bcce769d293d54f5c01c3d408da95404cdd828c2 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Thu, 18 Nov 2010 16:38:27 -0200 Subject: avoid "unreacheable code" warnings --- lmathlib.c | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/lmathlib.c b/lmathlib.c index 8e74f9cf..39069ed0 100644 --- a/lmathlib.c +++ b/lmathlib.c @@ -1,5 +1,5 @@ /* -** $Id: lmathlib.c,v 1.77 2010/11/11 15:39:12 roberto Exp roberto $ +** $Id: lmathlib.c,v 1.78 2010/11/12 15:47:34 roberto Exp roberto $ ** Standard mathematical library ** See Copyright Notice in lua.h */ @@ -136,11 +136,12 @@ static int math_log (lua_State *L) { static int math_log10 (lua_State *L) { #if !defined(LUA_COMPAT_LOG10) - luaL_error(L, "function " LUA_QL("log10") - " is deprecated; use log(x, 10) instead"); -#endif + return luaL_error(L, "function " LUA_QL("log10") + " is deprecated; use log(x, 10) instead"); +#else lua_pushnumber(L, l_tg(log10)(luaL_checknumber(L, 1))); return 1; +#endif } static int math_exp (lua_State *L) { -- cgit v1.2.3-55-g6feb