mirror of
https://github.com/neovim/neovim.git
synced 2025-02-25 18:55:25 -06:00
spellfile: Fix clint errors
This commit is contained in:
parent
aa857f9e48
commit
eb3663eb10
@ -546,7 +546,7 @@ static inline int spell_check_magic_string(FILE *const fd)
|
||||
FUNC_ATTR_NONNULL_ALL FUNC_ATTR_WARN_UNUSED_RESULT FUNC_ATTR_ALWAYS_INLINE
|
||||
{
|
||||
char buf[VIMSPELLMAGICL];
|
||||
SPELL_READ_BYTES(buf, VIMSPELLMAGICL, fd, );
|
||||
SPELL_READ_BYTES(buf, VIMSPELLMAGICL, fd, ;);
|
||||
if (memcmp(buf, VIMSPELLMAGIC, VIMSPELLMAGICL) != 0) {
|
||||
return SP_FORMERROR;
|
||||
}
|
||||
@ -1004,7 +1004,7 @@ static int read_region_section(FILE *fd, slang_T *lp, int len)
|
||||
if (len > 16) {
|
||||
return SP_FORMERROR;
|
||||
}
|
||||
SPELL_READ_NONNUL_BYTES((char *)lp->sl_regions, (size_t)len, fd, );
|
||||
SPELL_READ_NONNUL_BYTES((char *)lp->sl_regions, (size_t)len, fd, ;);
|
||||
lp->sl_regions[len] = NUL;
|
||||
return 0;
|
||||
}
|
||||
@ -1056,7 +1056,7 @@ static int read_prefcond_section(FILE *fd, slang_T *lp)
|
||||
lp->sl_prefprog = xcalloc(cnt, sizeof(regprog_T *));
|
||||
lp->sl_prefixcnt = cnt;
|
||||
|
||||
for (int i = 0; i < cnt; ++i) {
|
||||
for (int i = 0; i < cnt; i++) {
|
||||
// <prefcond> : <condlen> <condstr>
|
||||
const int n = getc(fd); // <condlen>
|
||||
if (n < 0 || n >= MAXWLEN) {
|
||||
@ -1068,7 +1068,7 @@ static int read_prefcond_section(FILE *fd, slang_T *lp)
|
||||
if (n > 0) {
|
||||
char buf[MAXWLEN + 1];
|
||||
buf[0] = '^'; // always match at one position only
|
||||
SPELL_READ_NONNUL_BYTES(buf + 1, (size_t)n, fd, );
|
||||
SPELL_READ_NONNUL_BYTES(buf + 1, (size_t)n, fd, ;);
|
||||
buf[n + 1] = NUL;
|
||||
lp->sl_prefprog[i] = vim_regcomp((char_u *)buf, RE_MAGIC | RE_STRING);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user