John Marriott wrote:
> On 21/4/17 6:57 am, Bram Moolenaar wrote:
> > Patch 8.0.0575
> > Problem: Using freed memory when resetting 'indentexpr' while evaluating
> > it. (Dominique Pelle)
> > Solution: Make a copy of 'indentexpr'.
> > Files: src/misc1.c, src/testdir/test_options.vim
> >
> >
> 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 misc1.c -o gobjnative/misc1.o
> misc1.c: In function 'get_expr_indent':
> misc1.c:9298:8: warning: 'indent' may be used uninitialized in this
> function [-Wmaybe-uninitialized]
> if (indent < 0)
> ^
> ...
>
> 'indent' probably should be initialised to something, zero perhaps?
Let's use -1, then get_indent() will be called and the value won't
change.
--
BLACK KNIGHT: I move for no man.
ARTHUR: So be it!
[hah] [parry thrust]
[ARTHUR chops the BLACK KNIGHT's left arm off]
ARTHUR: Now stand aside, worthy adversary.
BLACK KNIGHT: 'Tis but a scratch.
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.