From: Michihiro NAKAJIMA Date: Mon, 9 Nov 2009 08:03:27 +0000 (-0500) Subject: Value stored to 'i' is never read. X-Git-Tag: v2.8.0~190 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=71145f2f9b15397e537dc23d9babefc0da12e278;p=thirdparty%2Flibarchive.git Value stored to 'i' is never read. Found by Clang Static Analyzer. SVN-Revision: 1625 --- diff --git a/tar/util.c b/tar/util.c index 2b0751aea..9cf344a18 100644 --- a/tar/util.c +++ b/tar/util.c @@ -158,12 +158,12 @@ safe_fprintf(FILE *f, const char *fmt, ...) /* If our output buffer is full, dump it and keep going. */ if (i > (sizeof(outbuff) - 20)) { - outbuff[i++] = '\0'; + outbuff[i] = '\0'; fprintf(f, "%s", outbuff); i = 0; } } - outbuff[i++] = '\0'; + outbuff[i] = '\0'; fprintf(f, "%s", outbuff); /* If we allocated a heap-based formatting buffer, free it now. */