harec

[hare] Hare compiler, written in C11 for POSIX OSs
Log | Files | Refs | README | LICENSE

commit 455c64977a07527408376539be13fc0360ee593d
parent 8f49665e1fec8bd5cd8932d960e3ff7ba74cbea7
Author: Bor Grošelj Simić <bgs@turminal.net>
Date:   Fri, 17 Feb 2023 22:23:44 +0100

eval: silence some -Wmaybe-uninitialized warnings

Signed-off-by: Bor Grošelj Simić <bgs@turminal.net>

Diffstat:
Msrc/eval.c | 8++++----
1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/src/eval.c b/src/eval.c @@ -176,10 +176,10 @@ eval_binarithm(struct context *ctx, struct expression *in, struct expression *ou return r; } - bool blval, brval, bval; - intmax_t ilval, irval, ival; - uintmax_t ulval, urval, uval; - double flval, frval, fval; + bool blval = false, brval = false, bval = false; + intmax_t ilval = 0, irval = 0, ival = 0; + uintmax_t ulval = 0, urval = 0, uval = 0; + double flval = 0, frval = 0, fval = 0; if (type_is_float(lvalue.result)) { flval = lvalue.constant.fval, frval = rvalue.constant.fval; } else if (type_is_signed(lvalue.result)) {