From 9a666099aa56fb3eda5e6acb79d20a5eb2483f8b Mon Sep 17 00:00:00 2001 From: ZYH Date: Tue, 18 Sep 2018 15:30:52 +0800 Subject: [PATCH] [Components][Drivers][hwtimer]fix 'index' declared without an initial value --- components/drivers/hwtimer/hwtimer.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/components/drivers/hwtimer/hwtimer.c b/components/drivers/hwtimer/hwtimer.c index c3e5076343..3f8a9a42b4 100644 --- a/components/drivers/hwtimer/hwtimer.c +++ b/components/drivers/hwtimer/hwtimer.c @@ -30,7 +30,7 @@ rt_inline rt_uint32_t timeout_calc(rt_hwtimer_t *timer, rt_hwtimerval_t *tv) float overflow; float timeout; rt_uint32_t counter; - int i, index; + int i, index = 0; float tv_sec; float devi_min = 1; float devi;