From 0939d1bdffb9590435aa7e51640c93b76d13a7e5 Mon Sep 17 00:00:00 2001 From: olliw42 Date: Sun, 16 May 2021 23:54:58 +0200 Subject: [PATCH] get rid of two warnings, the 1st is in fact close to a bug --- radio/src/gui/colorlcd/colors.h | 2 +- radio/src/gui/colorlcd/select_fab_carousel.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/radio/src/gui/colorlcd/colors.h b/radio/src/gui/colorlcd/colors.h index 7a9c76604..8d0991676 100644 --- a/radio/src/gui/colorlcd/colors.h +++ b/radio/src/gui/colorlcd/colors.h @@ -101,7 +101,7 @@ inline void lcdSetColor(uint16_t color) lcdColorTable[CUSTOM_COLOR_INDEX] = color; } -#define COLOR(index) (lcdColorTable[ unsigned(index) & 0xFF ] << 16u) +#define COLOR(index) ((uint32_t)lcdColorTable[ unsigned(index) & 0xFF ] << 16u) #define ALARM_COLOR COLOR(ALARM_COLOR_INDEX) #define BARGRAPH1_COLOR COLOR(BARGRAPH1_COLOR_INDEX) diff --git a/radio/src/gui/colorlcd/select_fab_carousel.cpp b/radio/src/gui/colorlcd/select_fab_carousel.cpp index 215efe8d7..f1abe1d3c 100644 --- a/radio/src/gui/colorlcd/select_fab_carousel.cpp +++ b/radio/src/gui/colorlcd/select_fab_carousel.cpp @@ -40,7 +40,7 @@ void SelectFabCarousel::addButton(uint8_t icon, const char* title, coord_t x_pos = pageWidth * buttons;// + SELECT_BUTTON_BORDER / 2; buttons++; - auto button = new SelectFabButton(this, x_pos, y_pos, icon, title, pressHandler); + /*auto button =*/ new SelectFabButton(this, x_pos, y_pos, icon, title, pressHandler); setInnerWidth(pageWidth * buttons); // y_pos += button->width() + SELECT_BUTTON_BORDER;