Patch 7.4a.031
Problem: Compiler warnings. (Charles Campbell)
Solution: Initialize variables even when not needed.
Files: src/regexp_nfa.c, src/search.c
*** ../vim-7.4a.030/src/regexp_nfa.c 2013-07-14 12:34:52.000000000 +0200
--- src/regexp_nfa.c 2013-07-17 19:19:10.000000000 +0200
***************
*** 4060,4068 ****
sub = &subs->norm;
}
/* Set the position (with "off" added) in the subexpression. Save
* and restore it when it was in use. Otherwise fill any gap. */
- save_ptr = NULL;
if (REG_MULTI)
{
if (subidx < sub->in_use)
--- 4060,4072 ----
sub = &subs->norm;
}
+ /* avoid compiler warnings */
+ save_ptr = NULL;
+ save_lpos.lnum = 0;
+ save_lpos.col = 0;
+
/* Set the position (with "off" added) in the subexpression. Save
* and restore it when it was in use. Otherwise fill any gap. */
if (REG_MULTI)
{
if (subidx < sub->in_use)
***************
*** 4192,4202 ****
--- 4196,4211 ----
sub->list.multi[subidx].end.col =
(colnr_T)(reginput - regline + off);
}
+ /* avoid compiler warnings */
+ save_ptr = NULL;
}
else
{
save_ptr = sub->list.line[subidx].end;
sub->list.line[subidx].end = reginput + off;
+ /* avoid compiler warnings */
+ save_lpos.lnum = 0;
+ save_lpos.col = 0;
}
subs = addstate(l, state->out, subs, pim, off);
*** ../vim-7.4a.030/src/search.c 2013-07-03 22:18:52.000000000 +0200
--- src/search.c 2013-07-17 19:20:47.000000000 +0200
***************
*** 4509,4515 ****
int result; /* result of various function calls */
char_u old_p_ws = p_ws;
int flags = 0;
! pos_T save_VIsual;
int one_char;
/* wrapping should not occur */
--- 4509,4515 ----
int result; /* result of various function calls */
char_u old_p_ws = p_ws;
int flags = 0;
! pos_T save_VIsual = VIsual;
int one_char;
/* wrapping should not occur */
***************
*** 4522,4528 ****
if (VIsual_active)
{
orig_pos = curwin->w_cursor;
- save_VIsual = VIsual;
pos = curwin->w_cursor;
start_pos = VIsual;
--- 4522,4527 ----
*** ../vim-7.4a.030/src/version.c 2013-07-17 19:12:54.000000000 +0200
--- src/version.c 2013-07-17 19:21:10.000000000 +0200
***************
*** 729,730 ****
--- 729,732 ----
{ /* Add new patch number below this line */
+ /**/
+ 31,
/**/
--
Bad fashion can discourage normal people from interacting with the engineer
and talking about the cute things their children do.
(Scott Adams - The Dilbert principle)
/// 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/groups/opt_out.