[src] [components] avoid compiler optimize

This commit is contained in:
tyustli 2020-01-02 18:35:22 +08:00
parent 848c3ff02b
commit edfe6d5b28
1 changed files with 2 additions and 2 deletions

View File

@ -92,7 +92,7 @@ void rt_components_board_init(void)
rt_kprintf(":%d done\n", result); rt_kprintf(":%d done\n", result);
} }
#else #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++) 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); rt_kprintf(":%d done\n", result);
} }
#else #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 ++) for (fn_ptr = &__rt_init_rti_board_end; fn_ptr < &__rt_init_rti_end; fn_ptr ++)
{ {