]> git.ipfire.org Git - thirdparty/LuaJIT.git/commitdiff
Avoid compiler warnings.
authorMike Pall <mike>
Wed, 5 Jan 2011 20:48:01 +0000 (21:48 +0100)
committerMike Pall <mike>
Wed, 5 Jan 2011 20:48:01 +0000 (21:48 +0100)
src/lib_ffi.c

index 44ece1e70569f03855b263322b020976ac669a11..18a22ce13963e9e53c1f71e6b88d8db1de3f6aca 100644 (file)
@@ -264,7 +264,7 @@ static int ffi_arith_int64(lua_State *L, CTState *cts, FFIArith *fa, MMS mm)
        *up = u0 % u1;
       break;
     case MM_pow: *up = lj_cdata_powi64(u0, u1, (id == CTID_UINT64)); break;
-    case MM_unm: *up = -u0; break;
+    case MM_unm: *up = (uint64_t)-(int64_t)u0; break;
     default: lua_assert(0); break;
     }
     lj_gc_check(L);