diff options
author | Jack Humbert <jack.humb@gmail.com> | 2017-04-13 14:07:48 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-04-13 14:07:48 -0400 |
commit | 41a46c7c8e4aa2470c245cbe09deb57c0720698e (patch) | |
tree | 8b07323439fc477f47833d7ee7564e26b323a3eb /quantum/keymap_common.c | |
parent | d3301c0f8b0005738ab9aa2030d83739ffb5c4b6 (diff) | |
parent | d68294615f9c67764c06a7524fb59c22c024a106 (diff) | |
download | qmk_firmware-41a46c7c8e4aa2470c245cbe09deb57c0720698e.tar.gz qmk_firmware-41a46c7c8e4aa2470c245cbe09deb57c0720698e.zip |
Merge pull request #1224 from fredizzimo/fix_warnings
Fix all warnings and turn on warnings as errors
Diffstat (limited to 'quantum/keymap_common.c')
-rw-r--r-- | quantum/keymap_common.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/quantum/keymap_common.c b/quantum/keymap_common.c index 6cf4f031ff..9dafc8b516 100644 --- a/quantum/keymap_common.c +++ b/quantum/keymap_common.c @@ -179,5 +179,12 @@ uint16_t keymap_key_to_keycode(uint8_t layer, keypos_t key) __attribute__ ((weak)) uint16_t keymap_function_id_to_action( uint16_t function_id ) { + // The compiler sees the empty (weak) fn_actions and generates a warning + // This function should not be called in that case, so the warning is too strict + // If this function is called however, the keymap should have overridden fn_actions, and then the compile + // is comparing against the wrong array + #pragma GCC diagnostic push + #pragma GCC diagnostic ignored "-Warray-bounds" return pgm_read_word(&fn_actions[function_id]); + #pragma GCC diagnostic pop } |