diff options
Diffstat (limited to 'src/nvim/spellsuggest.c')
-rw-r--r-- | src/nvim/spellsuggest.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/nvim/spellsuggest.c b/src/nvim/spellsuggest.c index b4a9bed437..23c8c621b5 100644 --- a/src/nvim/spellsuggest.c +++ b/src/nvim/spellsuggest.c @@ -360,7 +360,7 @@ int spell_check_sps(void) sps_flags = 0; sps_limit = 9999; - for (p = (char *)p_sps; *p != NUL;) { + for (p = p_sps; *p != NUL;) { copy_option_part(&p, (char *)buf, MAXPATHL, ","); f = 0; @@ -758,7 +758,7 @@ static void spell_find_suggest(char_u *badptr, int badlen, suginfo_T *su, int ma } // Make a copy of 'spellsuggest', because the expression may change it. - sps_copy = vim_strsave(p_sps); + sps_copy = vim_strsave((char_u *)p_sps); // Loop over the items in 'spellsuggest'. for (p = (char *)sps_copy; *p != NUL;) { @@ -972,7 +972,7 @@ static void suggest_try_special(suginfo_T *su) char_u word[MAXWLEN]; // Recognize a word that is repeated: "the the". - char_u *p = skiptowhite(su->su_fbadword); + char_u *p = (char_u *)skiptowhite((char *)su->su_fbadword); size_t len = (size_t)(p - su->su_fbadword); p = (char_u *)skipwhite((char *)p); if (STRLEN(p) == len && STRNCMP(su->su_fbadword, p, len) == 0) { @@ -1369,8 +1369,8 @@ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, bool so if (compound_ok) { p = preword; - while (*skiptowhite(p) != NUL) { - p = (char_u *)skipwhite((char *)skiptowhite(p)); + while (*skiptowhite((char *)p) != NUL) { + p = (char_u *)skipwhite(skiptowhite((char *)p)); } if (fword_ends && !can_compound(slang, p, compflags + sp->ts_compsplit)) { @@ -1590,8 +1590,8 @@ static void suggest_trie_walk(suginfo_T *su, langp_T *lp, char_u *fword, bool so break; } p = preword; - while (*skiptowhite(p) != NUL) { - p = (char_u *)skipwhite((char *)skiptowhite(p)); + while (*skiptowhite((char *)p) != NUL) { + p = (char_u *)skipwhite(skiptowhite((char *)p)); } if (sp->ts_complen > sp->ts_compsplit && !can_compound(slang, p, @@ -2636,8 +2636,8 @@ static int stp_sal_score(suggest_T *stp, suginfo_T *su, slang_T *slang, char_u * // removing the space. Don't do it when the good word also contains a // space. if (ascii_iswhite(su->su_badptr[su->su_badlen]) - && *skiptowhite(stp->st_word) == NUL) { - for (p = fword; *(p = skiptowhite(p)) != NUL;) { + && *skiptowhite((char *)stp->st_word) == NUL) { + for (p = fword; *(p = (char_u *)skiptowhite((char *)p)) != NUL;) { STRMOVE(p, p + 1); } } @@ -3100,7 +3100,7 @@ static void add_suggestion(suginfo_T *su, garray_T *gap, const char_u *goodword, // being replaced "thes," -> "these" is a different suggestion from // "thes" -> "these". stp = &SUG(*gap, 0); - for (i = gap->ga_len; --i >= 0; ++stp) { + for (i = gap->ga_len; --i >= 0; stp++) { if (stp->st_wordlen == goodlen && stp->st_orglen == badlen && STRNCMP(stp->st_word, goodword, goodlen) == 0) { |