diff options
author | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-06-20 12:12:43 -0300 |
---|---|---|
committer | Roberto Ierusalimschy <roberto@inf.puc-rio.br> | 2013-06-20 12:12:43 -0300 |
commit | d6f5fb2d2c5cfeab1e0aaddac7f121a909eb9408 (patch) | |
tree | 27562907aa85eab313675bbce666cec0a4c54c38 | |
parent | 7c4cc505dbf67f9a0c09583588c9697d9f239a07 (diff) | |
download | lua-d6f5fb2d2c5cfeab1e0aaddac7f121a909eb9408.tar.gz lua-d6f5fb2d2c5cfeab1e0aaddac7f121a909eb9408.tar.bz2 lua-d6f5fb2d2c5cfeab1e0aaddac7f121a909eb9408.zip |
avoid warning for unary minus over an unsigned value
-rw-r--r-- | lapi.c | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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 | } |