diff options
author | cmdremily <68452184+cmdremily@users.noreply.github.com> | 2020-09-12 22:32:46 +0200 |
---|---|---|
committer | cmdremily <68452184+cmdremily@users.noreply.github.com> | 2020-09-23 14:15:25 +0200 |
commit | ef7c79b781318faaef4e6fe318fffade1b1ed299 (patch) | |
tree | 7dd2025fefc8646c7e5fccac9bb36a4bb6b0cc3e | |
parent | 8711dda0d31cae8719ca5fa20729cc877e1dee3c (diff) | |
download | qmk_firmware-ef7c79b781318faaef4e6fe318fffade1b1ed299.tar.gz qmk_firmware-ef7c79b781318faaef4e6fe318fffade1b1ed299.zip |
Fix issues with unused variables and functions preventing a clean compile.
-rw-r--r-- | quantum/process_keycode/process_rgb.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_rgb.c b/quantum/process_keycode/process_rgb.c index a1e46e034..d38af74f4 100644 --- a/quantum/process_keycode/process_rgb.c +++ b/quantum/process_keycode/process_rgb.c | |||
@@ -23,6 +23,7 @@ typedef void (*rgb_func_pointer)(void); | |||
23 | * | 23 | * |
24 | * noinline to optimise for firmware size not speed (not in hot path) | 24 | * noinline to optimise for firmware size not speed (not in hot path) |
25 | */ | 25 | */ |
26 | #if !(defined(RGBLIGHT_DISABLE_KEYCODES) || defined(RGB_MATRIX_DISABLE_KEYCODES)) | ||
26 | static void __attribute__((noinline)) handleKeycodeRGB(const uint8_t is_shifted, const rgb_func_pointer inc_func, const rgb_func_pointer dec_func) { | 27 | static void __attribute__((noinline)) handleKeycodeRGB(const uint8_t is_shifted, const rgb_func_pointer inc_func, const rgb_func_pointer dec_func) { |
27 | if (is_shifted) { | 28 | if (is_shifted) { |
28 | dec_func(); | 29 | dec_func(); |
@@ -30,6 +31,7 @@ static void __attribute__((noinline)) handleKeycodeRGB(const uint8_t is_shifted, | |||
30 | inc_func(); | 31 | inc_func(); |
31 | } | 32 | } |
32 | } | 33 | } |
34 | #endif | ||
33 | 35 | ||
34 | /** | 36 | /** |
35 | * Wrapper for animation mode | 37 | * Wrapper for animation mode |
@@ -56,7 +58,9 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) { | |||
56 | // Split keyboards need to trigger on key-up for edge-case issue | 58 | // Split keyboards need to trigger on key-up for edge-case issue |
57 | if (!record->event.pressed) { | 59 | if (!record->event.pressed) { |
58 | #endif | 60 | #endif |
61 | #if !(defined(RGBLIGHT_DISABLE_KEYCODES) || defined(RGB_MATRIX_DISABLE_KEYCODES)) | ||
59 | uint8_t shifted = get_mods() & MOD_MASK_SHIFT; | 62 | uint8_t shifted = get_mods() & MOD_MASK_SHIFT; |
63 | #endif | ||
60 | switch (keycode) { | 64 | switch (keycode) { |
61 | case RGB_TOG: | 65 | case RGB_TOG: |
62 | #if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) | 66 | #if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES) |