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.

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?

Cheers
John

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