PVS/V501: diff.c: silence warning

False positive: vim_fgets has side effects.
This commit is contained in:
Justin M. Keyes 2019-01-04 02:29:11 +01:00
parent 292b1790c8
commit 8586770e1f

View File

@ -1547,7 +1547,7 @@ static void diff_read(int idx_orig, int idx_new, diffout_T *dout)
} else if ((STRNCMP(line, "--- ", 4) == 0) } else if ((STRNCMP(line, "--- ", 4) == 0)
&& (vim_fgets(linebuf, LBUFLEN, fd) == 0) && (vim_fgets(linebuf, LBUFLEN, fd) == 0)
&& (STRNCMP(line, "+++ ", 4) == 0) && (STRNCMP(line, "+++ ", 4) == 0)
&& (vim_fgets(linebuf, LBUFLEN, fd) == 0) && (vim_fgets(linebuf, LBUFLEN, fd) == 0) // -V501
&& (STRNCMP(line, "@@ ", 3) == 0)) { && (STRNCMP(line, "@@ ", 3) == 0)) {
diffstyle = DIFF_UNIFIED; diffstyle = DIFF_UNIFIED;
} else { } else {