diff options
| author | tyustli <[email protected]> | 2020-01-02 18:35:22 +0800 |
|---|---|---|
| committer | tyustli <[email protected]> | 2020-01-02 18:35:22 +0800 |
| commit | edfe6d5b282e4278b2b64466f736a47b75399d47 (patch) | |
| tree | 71c5f38be5bbb4c0b4223e89e359c0b887083c2e /src/components.c | |
| parent | 848c3ff02bb10126d62ab9320973eda33c4f69e1 (diff) | |
[src] [components] avoid compiler optimize
Diffstat (limited to 'src/components.c')
| -rw-r--r-- | src/components.c | 4 |
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 ++) { |
