On Sat, Aug 6, 2022 at 11:37 PM Bram Moolenaar <[email protected]> wrote: > > > Tony wrote: > > > In the Huge, Big and Normal builds I get -Wmaybe-uninitialized > > warnings for line_attr in drawline.c but they are different in each > > case; I don't understand getting a -Wmaybe-uninitialized for a > > variable which was given an initial value on the line declaring it. > > This is gcc 12.1.1 20220721: > > line_attr itself is initialized, but it gets assigned from > line_attr_save, which the compiler thinks might be uninitialized. > > The compiler could be clearer about why it came to this warning.
...especially in the Big build where it tells me nothing more than «line_attr might be used uninitialized; it is defined as "int line_attr = 0"». > Otherwise it requires quite a bit of guessing. Patch 159 clears the -eval error and patch 161 clears the +eval warning which had me baffled. Thanks for finding out and explaining. Best regards, Tony. -- -- 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/CAJkCKXtoTE5H2tcBDiKw8PB6CudUgPZiWzY7iVib9cXiht-Zpg%40mail.gmail.com.
