From 4e02a1bf46995e784ea6f7688113a02a8dd3f8ed Mon Sep 17 00:00:00 2001 From: Eliseo Martínez Date: Mon, 10 Nov 2014 00:03:47 +0100 Subject: Fix warnings: fileio.c: readfile(): Dead assignment: HI. Problem : Dead assignment @ 1754. Diagnostic : Harmless issue. Rationale : It's true `iconv_fd` is not going to be used again (we are in the failure handler). But what is being done (assigning sentinel value to mark as "empty" after destroying) is in fact good practice, which could turn significant if more code is added later on. So, we don't want to remove this. Resolution : Leave it there, but exclude from analysis. --- src/nvim/fileio.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/nvim/fileio.c') diff --git a/src/nvim/fileio.c b/src/nvim/fileio.c index ecc05a9faa..16431d14c3 100644 --- a/src/nvim/fileio.c +++ b/src/nvim/fileio.c @@ -1751,7 +1751,9 @@ failed: # ifdef USE_ICONV if (iconv_fd != (iconv_t)-1) { iconv_close(iconv_fd); +# ifndef __clang_analyzer__ iconv_fd = (iconv_t)-1; +# endif } # endif -- cgit