From cd12410195e092f966db2c9e524c2cd5fd09fa1a Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Fri, 7 Mar 2014 13:19:00 -0300 Subject: new macro 'cast_void' --- lcode.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'lcode.c') diff --git a/lcode.c b/lcode.c index 6d26bd5c..0c505ba7 100644 --- a/lcode.c +++ b/lcode.c @@ -1,5 +1,5 @@ /* -** $Id: lcode.c,v 2.81 2014/03/06 13:58:28 roberto Exp roberto $ +** $Id: lcode.c,v 2.82 2014/03/06 16:15:18 roberto Exp roberto $ ** Code generator for Lua ** See Copyright Notice in lua.h */ @@ -756,8 +756,9 @@ void luaK_indexed (FuncState *fs, expdesc *t, expdesc *k) { static int validop (OpCode op, TValue *v1, TValue *v2) { lua_Number a, b; lua_Integer i; - (void)a; (void)b; /* macro may not use its arguments */ - if (luai_numinvalidop(op, (tonumber(v1, &a), a), (tonumber(v2, &b), b))) + cast_void(a); cast_void(b); /* macro may not use its arguments */ + if (luai_numinvalidop(op, (cast_void(tonumber(v1, &a)), a), + (cast_void(tonumber(v2, &b)), b))) return 0; switch (op) { case LUA_OPIDIV: /* division by 0 and conversion errors */ -- cgit v1.2.3-55-g6feb