mirror of
https://github.com/raspberrypi/pico-sdk.git
synced 2024-09-29 04:58:50 +08:00
rom_hword_as_ptr should use __force_inline (#1494)
This commit is contained in:
parent
8e169346a9
commit
8262a08af3
|
@ -118,7 +118,7 @@ typedef void *(*rom_table_lookup_fn)(uint16_t *table, uint32_t code);
|
||||||
|
|
||||||
#if PICO_C_COMPILER_IS_GNU && (__GNUC__ >= 12)
|
#if PICO_C_COMPILER_IS_GNU && (__GNUC__ >= 12)
|
||||||
// Convert a 16 bit pointer stored at the given rom address into a 32 bit pointer
|
// Convert a 16 bit pointer stored at the given rom address into a 32 bit pointer
|
||||||
static inline void *rom_hword_as_ptr(uint16_t rom_address) {
|
static __force_inline void *rom_hword_as_ptr(uint16_t rom_address) {
|
||||||
#pragma GCC diagnostic push
|
#pragma GCC diagnostic push
|
||||||
#pragma GCC diagnostic ignored "-Warray-bounds"
|
#pragma GCC diagnostic ignored "-Warray-bounds"
|
||||||
return (void *)(uintptr_t)*(uint16_t *)(uintptr_t)rom_address;
|
return (void *)(uintptr_t)*(uint16_t *)(uintptr_t)rom_address;
|
||||||
|
|
Loading…
Reference in New Issue
Block a user