forked from aniani/vim
updated for version 7.3.017
Problem: smatch reports errors. Solution: Fix the reported errors. (Dominique Pelle)
This commit is contained in:
parent
173c98550f
commit
a8fc79895e
10
src/spell.c
10
src/spell.c
@ -4951,7 +4951,7 @@ typedef struct spellinfo_S
|
|||||||
char_u *si_info; /* info text chars or NULL */
|
char_u *si_info; /* info text chars or NULL */
|
||||||
int si_region_count; /* number of regions supported (1 when there
|
int si_region_count; /* number of regions supported (1 when there
|
||||||
are no regions) */
|
are no regions) */
|
||||||
char_u si_region_name[16]; /* region names; used only if
|
char_u si_region_name[17]; /* region names; used only if
|
||||||
* si_region_count > 1) */
|
* si_region_count > 1) */
|
||||||
|
|
||||||
garray_T si_rep; /* list of fromto_T entries from REP lines */
|
garray_T si_rep; /* list of fromto_T entries from REP lines */
|
||||||
@ -9530,7 +9530,8 @@ init_spellfile()
|
|||||||
if (aspath)
|
if (aspath)
|
||||||
/* Use directory of an entry with path, e.g., for
|
/* Use directory of an entry with path, e.g., for
|
||||||
* "/dir/lg.utf-8.spl" use "/dir". */
|
* "/dir/lg.utf-8.spl" use "/dir". */
|
||||||
vim_strncpy(buf, curbuf->b_s.b_p_spl, lstart - curbuf->b_s.b_p_spl - 1);
|
vim_strncpy(buf, curbuf->b_s.b_p_spl,
|
||||||
|
lstart - curbuf->b_s.b_p_spl - 1);
|
||||||
else
|
else
|
||||||
/* Copy the path from 'runtimepath' to buf[]. */
|
/* Copy the path from 'runtimepath' to buf[]. */
|
||||||
copy_option_part(&rtp, buf, MAXPATHL, ",");
|
copy_option_part(&rtp, buf, MAXPATHL, ",");
|
||||||
@ -9539,13 +9540,14 @@ init_spellfile()
|
|||||||
/* Use the first language name from 'spelllang' and the
|
/* Use the first language name from 'spelllang' and the
|
||||||
* encoding used in the first loaded .spl file. */
|
* encoding used in the first loaded .spl file. */
|
||||||
if (aspath)
|
if (aspath)
|
||||||
vim_strncpy(buf, curbuf->b_s.b_p_spl, lend - curbuf->b_s.b_p_spl);
|
vim_strncpy(buf, curbuf->b_s.b_p_spl,
|
||||||
|
lend - curbuf->b_s.b_p_spl);
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
/* Create the "spell" directory if it doesn't exist yet. */
|
/* Create the "spell" directory if it doesn't exist yet. */
|
||||||
l = (int)STRLEN(buf);
|
l = (int)STRLEN(buf);
|
||||||
vim_snprintf((char *)buf + l, MAXPATHL - l, "/spell");
|
vim_snprintf((char *)buf + l, MAXPATHL - l, "/spell");
|
||||||
if (!filewritable(buf) != 2)
|
if (filewritable(buf) != 2)
|
||||||
vim_mkdir(buf, 0755);
|
vim_mkdir(buf, 0755);
|
||||||
|
|
||||||
l = (int)STRLEN(buf);
|
l = (int)STRLEN(buf);
|
||||||
|
@ -7600,10 +7600,10 @@ do_highlight(line, forceit, init)
|
|||||||
/*
|
/*
|
||||||
* Copy characters from arg[] to buf[], translating <> codes.
|
* Copy characters from arg[] to buf[], translating <> codes.
|
||||||
*/
|
*/
|
||||||
for (p = arg, off = 0; off < 100 && *p; )
|
for (p = arg, off = 0; off < 100 - 6 && *p; )
|
||||||
{
|
{
|
||||||
len = trans_special(&p, buf + off, FALSE);
|
len = trans_special(&p, buf + off, FALSE);
|
||||||
if (len) /* recognized special char */
|
if (len > 0) /* recognized special char */
|
||||||
off += len;
|
off += len;
|
||||||
else /* copy as normal char */
|
else /* copy as normal char */
|
||||||
buf[off++] = *p++;
|
buf[off++] = *p++;
|
||||||
|
@ -714,6 +714,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 */
|
||||||
|
/**/
|
||||||
|
17,
|
||||||
/**/
|
/**/
|
||||||
16,
|
16,
|
||||||
/**/
|
/**/
|
||||||
|
Loading…
x
Reference in New Issue
Block a user