From 37474873203f247552021ab5856ab69d777166a2 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 13 Dec 2019 14:02:42 -0300 Subject: Small correction in assertion --- lapi.c | 2 +- llimits.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lapi.c b/lapi.c index ffc4d5e5..8b48f7f5 100644 --- a/lapi.c +++ b/lapi.c @@ -230,7 +230,7 @@ LUA_API void lua_copy (lua_State *L, int fromidx, int toidx) { lua_lock(L); fr = index2value(L, fromidx); to = index2value(L, toidx); - api_check(l, isvalid(L, to), "invalid index"); + api_check(L, isvalid(L, to), "invalid index"); setobj(L, to, fr); if (isupvalue(toidx)) /* function upvalue? */ luaC_barrier(L, clCvalue(s2v(L->ci->func)), fr); diff --git a/llimits.h b/llimits.h index 2b52c83b..b86d3452 100644 --- a/llimits.h +++ b/llimits.h @@ -99,7 +99,7 @@ typedef LUAI_UACINT l_uacInt; ** assertion for checking API calls */ #if !defined(luai_apicheck) -#define luai_apicheck(l,e) lua_assert(e) +#define luai_apicheck(l,e) ((void)l, lua_assert(e)) #endif #define api_check(l,e,msg) luai_apicheck(l,(e) && msg) -- cgit v1.2.3-55-g6feb