]> sourceware.org Git - lvm2.git/commitdiff
Cleanup gcc warning
authorZdenek Kabelac <zkabelac@redhat.com>
Mon, 21 Nov 2011 13:15:40 +0000 (13:15 +0000)
committerZdenek Kabelac <zkabelac@redhat.com>
Mon, 21 Nov 2011 13:15:40 +0000 (13:15 +0000)
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'.

test/unit/bitset_t.c

index ff6bbfd9a487b91b6443df020b1c32441d38f570..b18ef94f42a2fdcf83a9abfc7fbeb2f396047cdc 100644 (file)
@@ -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++)
This page took 0.041645 seconds and 5 git commands to generate.