On Mi, 31 Jan 2024, Tony Mechelynck wrote:
> gui_gtk_x11.c: In function ‘scroll_event’: > gui_gtk_x11.c:2135:9: warning: ‘button’ may be used uninitialized > [-Wmaybe-uninitialized] > 2135 | gui_send_mouse_event(button, (int)event->x, (int)event->y, > | ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ > 2136 | FALSE, vim_modifiers); > | ~~~~~~~~~~~~~~~~~~~~~ > gui_gtk_x11.c:2059:13: note: ‘button’ was declared here > 2059 | int button; > | ^~~~~~ > > > Of course, this module is only included when building with +gui_gtk. > FWIW : Compiler used : > linux-tuxedo:~/.build/vim/vim-hg # gcc --version > gcc (SUSE Linux) 13.2.1 20240125 [revision > fc7d87e0ffadca49bec29b2107c1efd0da6b6ded] > Copyright (C) 2023 Free Software Foundation, Inc. > This is free software; see the source for copying conditions. There is NO > warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Hm, I starred at it for a while and cannot see how it can be undefined and I don't get that warning on Debian with gcc-12, gcc-13.2.0-10 and clang-14 Let me just initialize it as 0. Thanks, Christian -- #else /* !STDSTDIO */ /* The big, slow, and stupid way */ -- Larry Wall in str.c from the perl source code -- -- 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 vim_dev+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/vim_dev/ZbpKV7o%2BOIqwKRqZ%40256bit.org.