From eaac9ba5102797e0a7e5a1eedb43d792a44770c8 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 13 Jun 2012 13:43:29 -0700 Subject: [PATCH] Fix uninit variable in slab reclaim test Gcc version 4.7.0 reports the delta.tv_sec in the slab reclaim test as potentially unitialized. In practice this will never occur but to keep gcc happy we initialize the variable to zero. Signed-off-by: Brian Behlendorf --- module/splat/splat-kmem.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/splat/splat-kmem.c b/module/splat/splat-kmem.c index 8613ddc29..284c7c30e 100644 --- a/module/splat/splat-kmem.c +++ b/module/splat/splat-kmem.c @@ -1135,7 +1135,7 @@ splat_kmem_test13(struct file *file, void *arg) kmem_cache_data_t *kcd; dummy_page_t *dp; struct list_head list; - struct timespec start, delta; + struct timespec start, delta = { 0, 0 }; int size, count, slabs, fails = 0; int i, rc = 0, max_time = 10; -- 2.40.0