John Marriott wrote:

> On 25-Jan-2017 05:56, Bram Moolenaar wrote:
> > Patch 8.0.0234 (after 8.0.0225)
> > Problem:    When several lines are visually selected and one of them is 
> > short,
> >              using put may cause a crash. (Axel Bender)
> > Solution:   Check for a short line. (Christian Brabandt)
> > Files:      src/ops.c, src/testdir/test_put.vim
> >
> >
> After applying this patch I get this warning from gcc (Mingw64):
> ...
> gcc -c -Iproto -DWIN32 -DWINVER=0x0603 -D_WIN32_WINNT=0x0603 
> -DHAVE_PATHDEF -DFEAT_NORMAL -DHAVE_STDINT_H -DFEAT_GUI_W32
>   -DFEAT_CLIPBOARD -pipe -march=native -Wall -O3 -fomit-frame-pointer 
> -freg-struct-return -s ops.c -o gobjnative/ops.o
> ops.c: In function 'do_put':
> ops.c:3818:29: warning: 'end' may be used uninitialized in this function 
> [-Wmaybe-uninitialized]
>        } while (VIsual_active && lnum <= end);
>                 ~~~~~~~~~~~~~~^~~~~~~~~~~~~~
> ...
> 
> I'm not sure how it should be fixed.

It doesn't understand the condition.  Will have to initialize it.

> Also, in function do_put() I notice that in addition to the variable 
> "end" and there is a goto label with the same name. This could lead to 
> some confusion. Perhaps one should be renamed?

We can rename the variable, the label is used quite a lot.

-- 
    [clop clop]
ARTHUR:  Old woman!
DENNIS:  Man!
ARTHUR:  Man, sorry.  What knight lives in that castle over there?
DENNIS:  I'm thirty seven.
ARTHUR:  What?
DENNIS:  I'm thirty seven -- I'm not old!
                                  The Quest for the Holy Grail (Monty Python)

 /// 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