clang/"Null passed as a nonnull parameter" #10718

This commit is contained in:
Ihor Antonov 2019-08-09 05:24:30 -04:00 committed by Justin M. Keyes
parent 8a56bd944a
commit 3c0d637592

View File

@ -4242,6 +4242,7 @@ static void search_stat(int dirc, pos_T *pos,
// STRNICMP ignores case, but we should not ignore case.
// Unfortunately, there is no STRNICMP function.
if (!(chgtick == buf_get_changedtick(curbuf)
&& lastpat != NULL // supress clang/NULL passed as nonnull parameter
&& STRNICMP(lastpat, spats[last_idx].pat, STRLEN(lastpat)) == 0
&& STRLEN(lastpat) == STRLEN(spats[last_idx].pat)
&& equalpos(lastpos, curwin->w_cursor)