diff options
author | Philipp Zabel <p.zabel@pengutronix.de> | 2023-07-05 11:30:41 +0200 |
---|---|---|
committer | Geert Uytterhoeven <geert@linux-m68k.org> | 2023-07-05 11:47:40 +0200 |
commit | dba87e7bb0a024f77549221ffa8e388c6a3b2a6a (patch) | |
tree | ea7cf28231a51b0d8d80bf9b5c178cb919614fbd | |
parent | 47f6351b7c227308b213285d9fd3c1affa53871a (diff) | |
download | fbtest-dba87e7bb0a024f77549221ffa8e388c6a3b2a6a.tar.gz |
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>
-rw-r--r-- | util.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -158,7 +158,7 @@ static uint64_t get_ticks(void) double benchmark(void (*func)(unsigned long n, void *data), void *data) { - uint64_t ticks; + uint64_t ticks = 1; unsigned long n = 1; printf("Benchmarking... "); |