summaryrefslogtreecommitdiff
path: root/components/drivers
diff options
context:
space:
mode:
authorZYH <[email protected]>2018-09-18 15:30:52 +0800
committerZYH <[email protected]>2018-09-18 15:30:52 +0800
commit9a666099aa56fb3eda5e6acb79d20a5eb2483f8b (patch)
tree4c287897cb6ce7c324e732f46537aa5d03b69bce /components/drivers
parent1abe83531cd1800d5f16f3066155f51ef1272593 (diff)
[Components][Drivers][hwtimer]fix 'index' declared without an initial value
Diffstat (limited to 'components/drivers')
-rw-r--r--components/drivers/hwtimer/hwtimer.c2
1 files changed, 1 insertions, 1 deletions
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;