Tony Mechelynck wrote:

> On Tue, Jan 30, 2018 at 10:46 PM, Bram Moolenaar <[email protected]> wrote:
> >
> > Patch 8.0.1441
> > Problem:    Using ":undo 0" leaves undo in wrong state.
> > Solution:   Instead of searching for state 1 and go above, just use the 
> > start.
> >             (Ozaki Kiichi, closes #2595)
> > Files:      src/undo.c, src/testdir/test_undo.vim
> 
> This gives the following warning in both Huge and Tiny (so I'm quoting
> the Tiny log because the gcc command-line is shorter):
> 
> gcc -c -I. -Iproto -DHAVE_CONFIG_H     -O2 -fno-strength-reduce -Wall
> -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1        -o objects/undo.o undo.c
> undo.c: In function ‘undo_time’:
> undo.c:2592:19: warning: ‘mark’ may be used uninitialized in this
> function [-Wmaybe-uninitialized]
>    if (uhp == NULL || uhp->uh_walk != mark)
>                    ^

Strange that it complains about this specific line, mark is also used
earlier.  But it's unreached when "target == 0".  Let's assign a value
to silence the compiler.

-- 
    A KNIGHT rides into shot and hacks him to the ground.  He rides off.
    We stay for a moment on the glade.  A MIDDLE-AGED LADY in a C. & A.
    twin-set emerges from the trees and looks in horror at the body of her
    HUSBAND.
MRS HISTORIAN: FRANK!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// 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].
For more options, visit https://groups.google.com/d/optout.

Raspunde prin e-mail lui