aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-06-20 12:12:43 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2013-06-20 12:12:43 -0300
commitd6f5fb2d2c5cfeab1e0aaddac7f121a909eb9408 (patch)
tree27562907aa85eab313675bbce666cec0a4c54c38
parent7c4cc505dbf67f9a0c09583588c9697d9f239a07 (diff)
downloadlua-d6f5fb2d2c5cfeab1e0aaddac7f121a909eb9408.tar.gz
lua-d6f5fb2d2c5cfeab1e0aaddac7f121a909eb9408.tar.bz2
lua-d6f5fb2d2c5cfeab1e0aaddac7f121a909eb9408.zip
avoid warning for unary minus over an unsigned value
-rw-r--r--lapi.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/lapi.c b/lapi.c
index 51f782f0..e8e7104f 100644
--- a/lapi.c
+++ b/lapi.c
@@ -1,5 +1,5 @@
1/* 1/*
2** $Id: lapi.c,v 2.182 2013/06/14 18:32:45 roberto Exp roberto $ 2** $Id: lapi.c,v 2.183 2013/06/20 15:02:49 roberto Exp roberto $
3** Lua API 3** Lua API
4** See Copyright Notice in lua.h 4** See Copyright Notice in lua.h
5*/ 5*/
@@ -399,7 +399,7 @@ LUA_API lua_Unsigned lua_tounsignedx (lua_State *L, int idx, int *pisnum) {
399 if (luai_numisnan(L,n)) /* not a number? */ 399 if (luai_numisnan(L,n)) /* not a number? */
400 break; /* not an integer, too */ 400 break; /* not an integer, too */
401 res = cast_unsigned(n); 401 res = cast_unsigned(n);
402 if (neg) res = -res; 402 if (neg) res = 0u - res;
403 isnum = 1; 403 isnum = 1;
404 break; 404 break;
405 } 405 }