# \[PATCH fbtest\] Initialize ticks in benchmark()

- From: Philipp Zabel \<p.zabel@pengutronix.de\>
- Date: 2023-06-29 08:28:57 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2023/06/13467244
- Thread: https://ratatoskr.run/linux-fbdev/2023/06/13467244/t.md

```text
Fixes a build error 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>
---
 util.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/util.c b/util.c
index cdf89b38618a..1193523990e7 100644
--- a/util.c
+++ b/util.c
@@ -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 = 0;
     unsigned long n = 1;
 
     printf("Benchmarking... ");
-- 
2.39.2

```
