Initialize ticks in benchmark()
Fixes a build error due to a false positive possible uninitialized use
warning with GCC 13:
util.c: In function 'benchmark':
util.c:177:17: error: 'ticks' may be used uninitialized [-Werror=maybe-uninitialized]
util.c:161:14: note: 'ticks' was declared here
Signed-off-by: Philipp Zabel <p.zabel@pengutronix.de>
Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org>
Link: https://lore.kernel.org/r/20230705093041.422391-1-p.zabel@pengutronix.de
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
diff --git a/util.c b/util.c
index cdf89b3..f199ace 100644
--- a/util.c
+++ b/util.c
@@ -158,7 +158,7 @@
double benchmark(void (*func)(unsigned long n, void *data), void *data)
{
- uint64_t ticks;
+ uint64_t ticks = 1;
unsigned long n = 1;
printf("Benchmarking... ");