From 8cdaac0d80f7876f750ce8eb147c41b477409974 Mon Sep 17 00:00:00 2001 From: ZyX Date: Tue, 17 Apr 2018 01:49:46 +0300 Subject: [PATCH] event/process: Silence PVS/V547: assuming stream->num_bytes changes Not familiar with the code, but I assume that loop_poll_events can actually change stream->num_bytes, so condition is not always false. --- src/nvim/event/process.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nvim/event/process.c b/src/nvim/event/process.c index 60650344ce..fa31024a64 100644 --- a/src/nvim/event/process.c +++ b/src/nvim/event/process.c @@ -358,7 +358,7 @@ static void flush_stream(Process *proc, Stream *stream) } // Stream can be closed if it is empty. - if (num_bytes == stream->num_bytes) { + if (num_bytes == stream->num_bytes) { // -V547 if (stream->read_cb && !stream->did_eof) { // Stream callback could miss EOF handling if a child keeps the stream // open. But only send EOF if we haven't already.