rom_hword_as_ptr should use __force_inline (#1494)

This commit is contained in:
Graham Sanderson 2023-09-05 10:34:02 -05:00 committed by GitHub
parent 8e169346a9
commit 8262a08af3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -118,7 +118,7 @@ typedef void *(*rom_table_lookup_fn)(uint16_t *table, uint32_t code);
#if PICO_C_COMPILER_IS_GNU && (__GNUC__ >= 12)
// 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 ignored "-Warray-bounds"
return (void *)(uintptr_t)*(uint16_t *)(uintptr_t)rom_address;