Compile warning -Wmaybe-uninitialized about xxd (in gcc 13.2.1) for all featuresets of Vim

12 views
Skip to first unread message

Tony Mechelynck

unread,
Oct 6, 2023, 3:04:58 PM10/6/23
to Christian Brabandt, vim_dev
cd xxd; CC="gcc" CFLAGS=" -O2 -fno-strength-reduce -Wall
-Wno-deprecated-declarations -D_REENTRANT -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=1" LDFLAGS="-L/usr/local/lib -Wl,--as-needed" \
make -f Makefile
make[1]: Entering directory '/root/.build/vim/vim-hg/src/shadow-tiny/xxd'
gcc -O2 -fno-strength-reduce -Wall -Wno-deprecated-declarations
-D_REENTRANT -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -L/usr/local/lib
-Wl,--as-needed -DUNIX -o xxd xxd.c
In function ‘huntype’,
inlined from ‘main’ at xxd.c:919:16:
xxd.c:427:18: warning: ‘bt’ may be used uninitialized [-Wmaybe-uninitialized]
427 | if (bt < 0)
| ^
xxd.c: In function ‘main’:
xxd.c:367:55: note: ‘bt’ was declared here
367 | int c, ign_garb = 1, n1 = -1, n2 = 0, n3, p = cols, bt, b =
0, bcnt = 0;
| ^~
make[1]: Leaving directory '/root/.build/vim/vim-hg/src/shadow-tiny/xxd'


Best regards,
Tony.

Christian Brabandt

unread,
Oct 8, 2023, 2:39:09 PM10/8/23
to vim_dev
Ah sorry, I missed that one. Should be fixed now with v9.0.2003

Thanks,
Christian
--
Objects are lost only because people look where they are not rather than
where they are.
Reply all
Reply to author
Forward
0 new messages