CodethinkLabs/ofc

tv.integer maybe used uninitialized in function "ofc_sema_typeval_cast"

Closed this issue · 2 comments

when
make install
show error:

gcc-8 -O3 -Wall -Wextra -Werror -std=gnu99 -MD -MP -I include   -c -o src/sema/typeval.o -g src/sema/typeval.c
src/sema/typeval.c: In function 'ofc_sema_typeval_cast.part.4':
src/sema/typeval.c:1398:11: error: 'tv.<Ucc78>.integer' may be used uninitialized in this function [-Werror=maybe-uninitialized]
    if ((tv.integer < -128)

I checked the typeval.c file, maybe
typeval->type->type not equal to any of case, under
switch (typeval->type->type)

FYI, option 1 (using GCC8) results in another warning (also being treated as error) as I described in #45 .