[virt-tools-list] [PATCH 11/11] avoid legitimate gcc used-before-set warning
Jim Meyering
jim at meyering.net
Fri Jan 29 14:58:52 UTC 2010
From: Jim Meyering <meyering at redhat.com>
* test/test-filter.c (main): Initialize filter buffer before
trying to free it.
---
test/test-filter.c | 1 +
1 files changed, 1 insertions(+), 0 deletions(-)
diff --git a/test/test-filter.c b/test/test-filter.c
index dc3eaee..55eb2fd 100644
--- a/test/test-filter.c
+++ b/test/test-filter.c
@@ -30,6 +30,7 @@ int main(int argc, char** argv)
/* Ensure that freeing an uninitialized filter is invalid */
printf("Checking that freeing unitialized filter is invalid...\n");
+ memset (&filter, sizeof filter, 0);
ret = osi_free_filter(filter);
assert ( ret != 0 );
--
1.7.0.rc0.187.g226c
More information about the virt-tools-list
mailing list