summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBernard Xiong <[email protected]>2020-01-03 12:47:18 +0800
committerGitHub <[email protected]>2020-01-03 12:47:18 +0800
commit87f14c54cb47ea818fb90dc1bd1e79cad70d997f (patch)
tree8f749a3f8562fa24fc7a16cb355ae6822c6b9f01 /src
parent24f961fa70c7d110dd24c6c5b043aacfe4f2ce13 (diff)
parentedfe6d5b282e4278b2b64466f736a47b75399d47 (diff)
Merge pull request #3309 from tyustli/fix_init
[src] [components] fix compiler optimize bug
Diffstat (limited to 'src')
-rw-r--r--src/components.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/components.c b/src/components.c
index df3e0f0fb3..362cf3203f 100644
--- a/src/components.c
+++ b/src/components.c
@@ -92,7 +92,7 @@ void rt_components_board_init(void)
rt_kprintf(":%d done\n", result);
}
#else
- const init_fn_t *fn_ptr;
+ volatile const init_fn_t *fn_ptr;
for (fn_ptr = &__rt_init_rti_board_start; fn_ptr < &__rt_init_rti_board_end; fn_ptr++)
{
@@ -118,7 +118,7 @@ void rt_components_init(void)
rt_kprintf(":%d done\n", result);
}
#else
- const init_fn_t *fn_ptr;
+ volatile const init_fn_t *fn_ptr;
for (fn_ptr = &__rt_init_rti_board_end; fn_ptr < &__rt_init_rti_end; fn_ptr ++)
{