On Do, 16 Okt 2025, Tony Mechelynck wrote:
> This happens in Normal and Huge builds, not in Tiny. Also in Normal
> with Motif GUI but not in Tiny with Motif GUI:
>
> normal.c: In function ‘normal_cmd’:
> normal.c:991:19: warning: ‘prev_VIsual_active’ may be used
> uninitialized [-Wmaybe-uninitialized]
> 991 | if (finish_op || prev_VIsual_active)
> | ~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~
> normal.c:972:9: note: ‘prev_VIsual_active’ was declared here
> 972 | int prev_VIsual_active = VIsual_active;
> | ^~~~~~~~~~~~~~~~~~
>
> I think it's over-cautiousness on the part of gcc (SUSE Linux) 15.2.1
> 20251006. It may look silly, but what about replacing line 972 by the
> following?
>
> /* avoid gcc warning -Wmaybe-uninitialized a little lower */
> int prev_Visual_active = 0;
> prev_Visual_active = Visual_active;
I don't understand how this can happen and the warning already shows
that prev_VIsual_active has been initialized, so not sure.
Well, I installed gcc-15 on my Debian box, but it doesn't complain.
Thanks,
Christian
--
Romeo wasn't bilked in a day.
-- Walt Kelly, "Ten Ever-Lovin' Blue-Eyed Years With Pogo"
--
--
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 visit
https://groups.google.com/d/msgid/vim_dev/aPKENlKfWKsuU6o%2B%40256bit.org.