From: Bruce Cran Date: Thu, 21 Feb 2013 13:16:17 +0000 (+0100) Subject: Declare 'prev' and 'this' outside the loop to avoid clang warning about 'prev' being... X-Git-Tag: fio-2.0.14~3 X-Git-Url: https://git.kernel.dk/?a=commitdiff_plain;h=80da8a8fbbc82356eee6aaad7ac7a28443f8dff6;p=fio.git Declare 'prev' and 'this' outside the loop to avoid clang warning about 'prev' being uninitialized Signed-off-by: Jens Axboe --- diff --git a/gettime.c b/gettime.c index cc9dcb7b..5b85a23b 100644 --- a/gettime.c +++ b/gettime.c @@ -501,6 +501,7 @@ int fio_monotonic_clocktest(void) unsigned int nr_cpus = cpus_online(); struct clock_entry *entries; unsigned long tentries, failed; + struct clock_entry *prev, *this; uint64_t seq = 0; int i; @@ -558,7 +559,7 @@ int fio_monotonic_clocktest(void) qsort(entries, tentries, sizeof(struct clock_entry), clock_cmp); for (failed = i = 0; i < tentries; i++) { - struct clock_entry *prev, *this = &entries[i]; + this = &entries[i]; if (!i) { prev = this;