From ff7f70314eb2b005124b9f365a5a64ea6b5d32dd Mon Sep 17 00:00:00 2001 From: Drashna Jaelre Date: Sat, 7 Nov 2020 21:35:21 -0800 Subject: [PATCH] [Keyboard] Fix unused variables in mschwingen modelm (#10811) Specifically, the lgreen variable isn't used, and avr-gcc 8.x complains about this. To prevent it from being an issue, just set all of these led variables to be unused. --- keyboards/mschwingen/modelm/modelm.c | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/keyboards/mschwingen/modelm/modelm.c b/keyboards/mschwingen/modelm/modelm.c index 5756a95170b..c1180612ad0 100644 --- a/keyboards/mschwingen/modelm/modelm.c +++ b/keyboards/mschwingen/modelm/modelm.c @@ -47,19 +47,19 @@ static cRGB led[RGBLED_NUM] = {{255, 255, 255}, {255, 255, 255}, {255, 255, 255} static const cRGB black = {.r = 0, .g = 0, .b = 0}; -static const cRGB green = {.r = 0, .g = BRIGHT, .b = 0}; -static const cRGB lgreen = {.r = 0, .g = DIM, .b = 0}; +static const __attribute__((unused)) cRGB green = {.r = 0, .g = BRIGHT, .b = 0}; +static const __attribute__((unused)) cRGB lgreen = {.r = 0, .g = DIM, .b = 0}; -static const cRGB red = {.r = BRIGHT, .g = 0, .b = 0}; -static const cRGB lred = {.r = DIM, .g = 0, .b = 0}; +static const __attribute__((unused)) cRGB red = {.r = BRIGHT, .g = 0, .b = 0}; +static const __attribute__((unused)) cRGB lred = {.r = DIM, .g = 0, .b = 0}; -static const cRGB blue = {.r = 0, .g = 0, .b = BRIGHT}; -static const cRGB lblue = {.r = 0, .g = 0, .b = DIM}; +static const __attribute__((unused)) cRGB blue = {.r = 0, .g = 0, .b = BRIGHT}; +static const __attribute__((unused)) cRGB lblue = {.r = 0, .g = 0, .b = DIM}; -static const cRGB turq = {.r = 0, .g = BRIGHT, .b = BRIGHT}; -static const cRGB lturq = {.r = 0, .g = DIM, .b = DIM}; +static const __attribute__((unused)) cRGB turq = {.r = 0, .g = BRIGHT, .b = BRIGHT}; +static const __attribute__((unused)) cRGB lturq = {.r = 0, .g = DIM, .b = DIM}; -static const cRGB white = {.r = BRIGHT, .g = BRIGHT, .b = BRIGHT}; +static const __attribute__((unused)) cRGB white = {.r = BRIGHT, .g = BRIGHT, .b = BRIGHT}; static led_t led_state; static uint8_t layer;