Python-SIP/sip

Compiler warning when compiling sip module

Closed this issue · 0 comments

When compiling the sip module with GCC 14, I'm seeing the following compile warning:

gcc -fno-strict-overflow -Wsign-compare -DDYNAMIC_ANNOTATIONS_ENABLED=1 -DNDEBUG -fcf-protection -fexceptions -fcf-protection -fexceptions -fcf-protection -fexceptions -O3 -O2 -flto=auto -ffat-lto-objects -fexceptions -g -grecord-gcc-switches -pipe -Wall -Werror=format-security -Wp,-U_FORTIFY_SOURCE,-D_FORTIFY_SOURCE=3 -Wp,-D_GLIBCXX_ASSERTIONS -specs=/usr/lib/rpm/redhat/redhat-hardened-cc1 -fstack-protector-strong -specs=/usr/lib/rpm/redhat/redhat-annobin-cc1 -m64 -march=x86-64 -mtune=generic -fasynchronous-unwind-tables -fstack-clash-protection -fcf-protection -mtls-dialect=gnu2 -fno-omit-frame-pointer -mno-omit-leaf-frame-pointer -fPIC -DSIP_PROTECTED_IS_PUBLIC -Dprotected=public -I. -I/usr/include/python3.13 -c sip_core.c -o build/temp.linux-x86_64-cpython-313/sip_core.o
sip_core.c: In function ‘parsePass2’:
sip_core.c:5088:24: warning: ‘enc’ may be used uninitialized [-Wmaybe-uninitialized]
 5088 |                     if (enc < 0)
      |                        ^
sip_core.c:5071:25: note: ‘enc’ was declared here
 5071 |                     int enc;
      |                         ^~~