Yegappan wrote:
> 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
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 -- [email protected] -- 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 ///
--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php
---
You received this message because you are subscribed to the Google Groups
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/vim_dev/202002272049.01RKnIdn013886%40masaka.moolenaar.net.