aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-02-07 14:17:03 -0300
committerRoberto Ierusalimschy <roberto@inf.puc-rio.br>2024-02-07 14:17:03 -0300
commit8b83417de982d068bd92e0428a42ca0cdd909789 (patch)
treecd9d0be41e457fd3b5b26d10568a505941d1046a
parente288c5a91883793d14ed9e9d93464f6ee0b08915 (diff)
downloadlua-8b83417de982d068bd92e0428a42ca0cdd909789.tar.gz
lua-8b83417de982d068bd92e0428a42ca0cdd909789.tar.bz2
lua-8b83417de982d068bd92e0428a42ca0cdd909789.zip
Avoids a warning when lua_Number is 'float'
-rw-r--r--lmathlib.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lmathlib.c b/lmathlib.c
index f140d623..43810634 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}