From: Zdenek Kabelac Date: Mon, 21 Nov 2011 13:15:40 +0000 (+0000) Subject: Cleanup gcc warning X-Git-Tag: old-v2_02_89~174 X-Git-Url: https://sourceware.org/git/?a=commitdiff_plain;h=2e72b04376076ef00f58ebccaadc9ca28baf4252;p=lvm2.git Cleanup gcc warning bitset_t.c:39: warning: 'last' may be used uninitialized in this function Compiler is not smart enough to see the code path which avoid using unitialized 'last'. --- diff --git a/test/unit/bitset_t.c b/test/unit/bitset_t.c index ff6bbfd9a..b18ef94f4 100644 --- a/test/unit/bitset_t.c +++ b/test/unit/bitset_t.c @@ -36,7 +36,7 @@ int bitset_fini() { static void test_get_next() { - int i, j, last, first; + int i, j, last = 0, first; dm_bitset_t bs = dm_bitset_create(mem, NR_BITS); for (i = 0; i < NR_BITS; i++)