Skip to content

Commit

Permalink
rom_hword_as_ptr should use __force_inline
Browse files Browse the repository at this point in the history
  • Loading branch information
kilograham committed Sep 5, 2023
1 parent 8e16934 commit ee95257
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/rp2_common/pico_bootrom/include/pico/bootrom.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit ee95257

Please sign in to comment.