]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Avoid the error which Clang Static Analyzer says "Function call argument is an uninit...
authorMichihiro NAKAJIMA <ggcueroad@gmail.com>
Tue, 28 Feb 2012 10:06:38 +0000 (19:06 +0900)
committerMichihiro NAKAJIMA <ggcueroad@gmail.com>
Sun, 11 Mar 2012 05:42:01 +0000 (14:42 +0900)
libarchive/archive_ppmd7.c

index 10ae2aeab27a41ca6ef9021c72dc05ec0d94e70f..13a258188a61b4234d8bb7e80034c11d0bd95154 100644 (file)
@@ -415,7 +415,7 @@ static CTX_PTR CreateSuccessors(CPpmd7 *p, Bool skip)
     upState.Freq = (Byte)(1 + ((2 * cf <= s0) ? (5 * cf > s0) : ((2 * cf + 3 * s0 - 1) / (2 * s0))));
   }
 
-  do
+  while (numPs != 0)
   {
     /* Create Child */
     CTX_PTR c1; /* = AllocContext(p); */
@@ -435,7 +435,6 @@ static CTX_PTR CreateSuccessors(CPpmd7 *p, Bool skip)
     SetSuccessor(ps[--numPs], REF(c1));
     c = c1;
   }
-  while (numPs != 0);
   
   return c;
 }