aboutsummaryrefslogtreecommitdiff
path: root/lmathlib.c
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-02-15 11:18:34 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-02-15 11:18:34 -0300
commit7237eb3f1c480d6bc7fe2832ddd36f2137fb69d9 (patch)
tree618bb144df3f37b000fc12db0738a5d3ec3efbef /lmathlib.c
parent165389b27bc54e7c5214276db177e3ef75226f18 (diff)
downloadlua-7237eb3f1c480d6bc7fe2832ddd36f2137fb69d9.tar.gz
lua-7237eb3f1c480d6bc7fe2832ddd36f2137fb69d9.tar.bz2
lua-7237eb3f1c480d6bc7fe2832ddd36f2137fb69d9.zip
Fixed warnings from different compilers
Diffstat (limited to 'lmathlib.c')
-rw-r--r--lmathlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lmathlib.c b/lmathlib.c
index c0a75f06..c1041f37 100644
--- a/lmathlib.c
+++ b/lmathlib.c
@@ -352,7 +352,7 @@ static lua_Number I2d (Rand64 x) {
352 SRand64 sx = (SRand64)(trim64(x) >> shift64_FIG); 352 SRand64 sx = (SRand64)(trim64(x) >> shift64_FIG);
353 lua_Number res = (lua_Number)(sx) * scaleFIG; 353 lua_Number res = (lua_Number)(sx) * scaleFIG;
354 if (sx < 0) 354 if (sx < 0)
355 res += 1.0; /* correct the two's complement if negative */ 355 res += l_mathop(1.0); /* correct the two's complement if negative */
356 lua_assert(0 <= res && res < 1); 356 lua_assert(0 <= res && res < 1);
357 return res; 357 return res;
358} 358}