tv.integer maybe used uninitialized in function "ofc_sema_typeval_cast"
Closed this issue · 2 comments
songyongshun commented
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)
ben-brewer-codethink commented
Hey,
This is just because we enabled -Wextra -Werror. This is a false
positive from GCC.
As far as I remember there are two options:
1. Use a newer version of GCC.
2. Disable -Werror
Hope that helps,
Ben
…On 18/04/2019 03:13, richor wrote:
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)|
—
You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
<#43>, or mute the thread
<https://github.com/notifications/unsubscribe-auth/AB4TBYSU3BFENWRM7WFLECTPQ7KMTANCNFSM4HGZFGZA>.