From 6221f5a819bb4e55f509fb73b680cdf7ae7bf3a0 Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Mon, 11 Mar 2019 12:13:01 +0800 Subject: [PATCH] espcoredump: fix test compilation error with GCC 8 --- components/espcoredump/test/test_core_dump.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/components/espcoredump/test/test_core_dump.c b/components/espcoredump/test/test_core_dump.c index cbc2328cee..024d2301db 100644 --- a/components/espcoredump/test/test_core_dump.c +++ b/components/espcoredump/test/test_core_dump.c @@ -23,7 +23,7 @@ volatile unsigned long crash_flags = TCI_UNALIGN_PTR; void bad_ptr_func() { unsigned long *ptr = (unsigned long *)0; - volatile int cnt; + volatile int cnt = 0; int i = 0; for (i = 0; i < 1000; i++) { @@ -51,7 +51,7 @@ void recur_func() { static int rec_cnt; unsigned short *ptr = (unsigned short *)0x5; - volatile int cnt; + volatile int cnt = 0; int i = 0; if (rec_cnt++ > 2) { -- 2.40.0