diff options
| author | Damien <Dbroqua@users.noreply.github.com> | 2017-04-29 15:03:52 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2017-04-29 15:03:52 +0200 |
| commit | 584b804ee33d53102fef3b8cdd045bca4c47bf26 (patch) | |
| tree | cccdc512fed02293ffd0bfb962ec14d8a8664e7f /quantum/keymap_common.c | |
| parent | 215dd126d08b29939c53bf0eaa006ce6ecdedb83 (diff) | |
| parent | 26bbfd78125224abdbd2e4ccf3aa3df1b5fc4968 (diff) | |
| download | qmk_firmware-584b804ee33d53102fef3b8cdd045bca4c47bf26.tar.gz qmk_firmware-584b804ee33d53102fef3b8cdd045bca4c47bf26.zip | |
Merge pull request #21 from qmk/master
Merge from QMK
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 6cf4f031f..9dafc8b51 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) | |||
| 179 | __attribute__ ((weak)) | 179 | __attribute__ ((weak)) |
| 180 | uint16_t keymap_function_id_to_action( uint16_t function_id ) | 180 | uint16_t keymap_function_id_to_action( uint16_t function_id ) |
| 181 | { | 181 | { |
| 182 | // The compiler sees the empty (weak) fn_actions and generates a warning | ||
| 183 | // This function should not be called in that case, so the warning is too strict | ||
| 184 | // If this function is called however, the keymap should have overridden fn_actions, and then the compile | ||
| 185 | // is comparing against the wrong array | ||
| 186 | #pragma GCC diagnostic push | ||
| 187 | #pragma GCC diagnostic ignored "-Warray-bounds" | ||
| 182 | return pgm_read_word(&fn_actions[function_id]); | 188 | return pgm_read_word(&fn_actions[function_id]); |
| 189 | #pragma GCC diagnostic pop | ||
| 183 | } | 190 | } |
