Warning messages seen when building the latest Vim on MacOS

18 views
Skip to first unread message

Yegappan Lakshmanan

unread,
Feb 27, 2020, 12:01:09 AM2/27/20
to vim_dev
Hi,

I am seeing the following warning messages when building the
latest Vim (8.2.0324) on MacOS using -Wall:

gcc -c -I. -Iproto -DHAVE_CONFIG_H -DMACOS_X -DMACOS_X_DARWIN -g
-O0 -Wall -Wextra -pedantic -o objects/vim9execute.o
vim9execute.c
vim9execute.c:438:9: warning: variable 'initial_frame_ptr' is used uninitialized
whenever 'if' condition is true [-Wsometimes-uninitialized]
if (ga_grow(&ectx.ec_stack, 20) == FAIL)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim9execute.c:1640:29: note: uninitialized use occurs here
while (ectx.ec_frame != initial_frame_ptr)
^~~~~~~~~~~~~~~~~
vim9execute.c:438:5: note: remove the 'if' if its condition is always false
if (ga_grow(&ectx.ec_stack, 20) == FAIL)
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
vim9execute.c:419:27: note: initialize the variable 'initial_frame_ptr' to
silence this warning
int initial_frame_ptr;
^
= 0
1 warning generated.

- Yegappan

Bram Moolenaar

unread,
Feb 27, 2020, 3:49:29 PM2/27/20
to vim...@googlegroups.com, Yegappan Lakshmanan
It's because of the early jump to "failed". It can just return there.

--
hundred-and-one symptoms of being an internet addict:
126. You brag to all of your friends about your date Saturday night...but
you don't tell them it was only in a chat room.

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\ an exciting new programming language -- http://www.Zimbu.org ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
Reply all
Reply to author
Forward
0 new messages