From 8b8304f16e03aa652be728f0dc957eadf42e4353 Mon Sep 17 00:00:00 2001 From: Mike Pall Date: Tue, 8 Mar 2022 20:05:33 +0100 Subject: [PATCH] Fix compiler warning. --- src/lj_opt_fold.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/lj_opt_fold.c b/src/lj_opt_fold.c index 92bdc553..7ef09a1f 100644 --- a/src/lj_opt_fold.c +++ b/src/lj_opt_fold.c @@ -1112,11 +1112,11 @@ LJFOLDF(simplify_nummuldiv_negneg) LJFOLD(POW any KNUM) LJFOLDF(simplify_numpow_k) { - if (knumright == 0) /* x ^ 0 ==> 1 */ + if (knumright == 0.0) /* x ^ 0 ==> 1 */ return lj_ir_knum_one(J); /* Result must be a number, not an int. */ - else if (knumright == 1) /* x ^ 1 ==> x */ + else if (knumright == 1.0) /* x ^ 1 ==> x */ return LEFTFOLD; - else if (knumright == 2) /* x ^ 2 ==> x * x */ + else if (knumright == 2.0) /* x ^ 2 ==> x * x */ return emitir(IRTN(IR_MUL), fins->op1, fins->op1); else return NEXTFOLD;