summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorcmdremily <68452184+cmdremily@users.noreply.github.com>2020-09-12 22:32:46 +0200
committerDrashna Jael're <drashna@live.com>2021-01-12 22:43:29 -0800
commit0a3d60d35601ba778fa3e6cdfd23697afd2d6fe5 (patch)
tree3e68fa2c7cf7302f94a7f531ac63a70030636086
parent2afb475019acf4058b4065447f60541f53b7b349 (diff)
Fix issues with unused variables and functions preventing a clean compile.
-rw-r--r--quantum/process_keycode/process_rgb.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/quantum/process_keycode/process_rgb.c b/quantum/process_keycode/process_rgb.c
index a1e46e0348..d38af74f41 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);
*
* noinline to optimise for firmware size not speed (not in hot path)
*/
+#if !(defined(RGBLIGHT_DISABLE_KEYCODES) || defined(RGB_MATRIX_DISABLE_KEYCODES))
static void __attribute__((noinline)) handleKeycodeRGB(const uint8_t is_shifted, const rgb_func_pointer inc_func, const rgb_func_pointer dec_func) {
if (is_shifted) {
dec_func();
@@ -30,6 +31,7 @@ static void __attribute__((noinline)) handleKeycodeRGB(const uint8_t is_shifted,
inc_func();
}
}
+#endif
/**
* Wrapper for animation mode
@@ -56,7 +58,9 @@ bool process_rgb(const uint16_t keycode, const keyrecord_t *record) {
// Split keyboards need to trigger on key-up for edge-case issue
if (!record->event.pressed) {
#endif
+#if !(defined(RGBLIGHT_DISABLE_KEYCODES) || defined(RGB_MATRIX_DISABLE_KEYCODES))
uint8_t shifted = get_mods() & MOD_MASK_SHIFT;
+#endif
switch (keycode) {
case RGB_TOG:
#if defined(RGBLIGHT_ENABLE) && !defined(RGBLIGHT_DISABLE_KEYCODES)