mirror of
https://github.com/vim/vim.git
synced 2025-09-06 21:53:38 -04:00
patch 7.4.1780
Problem: Warnings reported by cppcheck. Solution: Fix the warnings. (Dominique Pelle)
This commit is contained in:
parent
73dfe917ba
commit
dc633cf827
@ -335,9 +335,8 @@ do_debug(char_u *cmd)
|
|||||||
get_maxbacktrace_level(void)
|
get_maxbacktrace_level(void)
|
||||||
{
|
{
|
||||||
char *p, *q;
|
char *p, *q;
|
||||||
int maxbacktrace = 1;
|
int maxbacktrace = 0;
|
||||||
|
|
||||||
maxbacktrace = 0;
|
|
||||||
if (sourcing_name != NULL)
|
if (sourcing_name != NULL)
|
||||||
{
|
{
|
||||||
p = (char *)sourcing_name;
|
p = (char *)sourcing_name;
|
||||||
|
@ -539,7 +539,6 @@ json_decode_string(js_read_T *reader, typval_T *res)
|
|||||||
char_u *p;
|
char_u *p;
|
||||||
int c;
|
int c;
|
||||||
long nr;
|
long nr;
|
||||||
char_u buf[NUMBUFLEN];
|
|
||||||
|
|
||||||
if (res != NULL)
|
if (res != NULL)
|
||||||
ga_init2(&ga, 1, 200);
|
ga_init2(&ga, 1, 200);
|
||||||
@ -617,6 +616,7 @@ json_decode_string(js_read_T *reader, typval_T *res)
|
|||||||
if (res != NULL)
|
if (res != NULL)
|
||||||
{
|
{
|
||||||
#ifdef FEAT_MBYTE
|
#ifdef FEAT_MBYTE
|
||||||
|
char_u buf[NUMBUFLEN];
|
||||||
buf[utf_char2bytes((int)nr, buf)] = NUL;
|
buf[utf_char2bytes((int)nr, buf)] = NUL;
|
||||||
ga_concat(&ga, buf);
|
ga_concat(&ga, buf);
|
||||||
#else
|
#else
|
||||||
|
@ -1197,7 +1197,7 @@ open_line(
|
|||||||
int i;
|
int i;
|
||||||
int l;
|
int l;
|
||||||
|
|
||||||
for (i = 0; p[i] != NUL && i < lead_len; i += l)
|
for (i = 0; i < lead_len && p[i] != NUL; i += l)
|
||||||
{
|
{
|
||||||
l = (*mb_ptr2len)(p + i);
|
l = (*mb_ptr2len)(p + i);
|
||||||
if (vim_strnsize(p, i + l) > repl_size)
|
if (vim_strnsize(p, i + l) > repl_size)
|
||||||
|
@ -5709,7 +5709,7 @@ do_addsub(
|
|||||||
if (buf1 == NULL)
|
if (buf1 == NULL)
|
||||||
goto theend;
|
goto theend;
|
||||||
ptr = buf1;
|
ptr = buf1;
|
||||||
if (negative && (!visual || (visual && was_positive)))
|
if (negative && (!visual || was_positive))
|
||||||
{
|
{
|
||||||
*ptr++ = '-';
|
*ptr++ = '-';
|
||||||
}
|
}
|
||||||
|
@ -5515,14 +5515,9 @@ nfa_regmatch(
|
|||||||
int add_off = 0;
|
int add_off = 0;
|
||||||
int toplevel = start->c == NFA_MOPEN;
|
int toplevel = start->c == NFA_MOPEN;
|
||||||
#ifdef NFA_REGEXP_DEBUG_LOG
|
#ifdef NFA_REGEXP_DEBUG_LOG
|
||||||
FILE *debug = fopen(NFA_REGEXP_DEBUG_LOG, "a");
|
FILE *debug;
|
||||||
|
|
||||||
if (debug == NULL)
|
|
||||||
{
|
|
||||||
EMSG2(_("(NFA) COULD NOT OPEN %s !"), NFA_REGEXP_DEBUG_LOG);
|
|
||||||
return FALSE;
|
|
||||||
}
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Some patterns may take a long time to match, especially when using
|
/* Some patterns may take a long time to match, especially when using
|
||||||
* recursive_regmatch(). Allow interrupting them with CTRL-C. */
|
* recursive_regmatch(). Allow interrupting them with CTRL-C. */
|
||||||
fast_breakcheck();
|
fast_breakcheck();
|
||||||
@ -5533,6 +5528,14 @@ nfa_regmatch(
|
|||||||
return FALSE;
|
return FALSE;
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef NFA_REGEXP_DEBUG_LOG
|
||||||
|
debug = fopen(NFA_REGEXP_DEBUG_LOG, "a");
|
||||||
|
if (debug == NULL)
|
||||||
|
{
|
||||||
|
EMSG2(_("(NFA) COULD NOT OPEN %s !"), NFA_REGEXP_DEBUG_LOG);
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
#endif
|
||||||
nfa_match = FALSE;
|
nfa_match = FALSE;
|
||||||
|
|
||||||
/* Allocate memory for the lists of nodes. */
|
/* Allocate memory for the lists of nodes. */
|
||||||
|
@ -753,6 +753,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
1780,
|
||||||
/**/
|
/**/
|
||||||
1779,
|
1779,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user