From 728ee457cc3f3365655e174d53486a63bc4e49b4 Mon Sep 17 00:00:00 2001 From: Chris Mayo Date: Mon, 22 Dec 2025 19:26:03 +0000 Subject: [PATCH] Use uint16_t for showmsgXY() colour MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Aligns with Adafruit_GFX setTextColor() that is being used here. Resolves warning: src/EX-Fast_Clock.h:44:17: warning: overflow in conversion from ‘unsigned int’ to ‘char’ changes value from ‘65504’ to ‘-32’ [-Woverflow] 44 | #define YELLOW 0xFFE0 | ^~~~~~ src/EX-Fast_Clock.cpp:269:31: note: in expansion of macro ‘YELLOW’ 269 | showmsgXY(55, 160, 2, YELLOW, "PAUSED"); --- src/EX-Fast_Clock.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/EX-Fast_Clock.cpp b/src/EX-Fast_Clock.cpp index ad45913..0a2928a 100644 --- a/src/EX-Fast_Clock.cpp +++ b/src/EX-Fast_Clock.cpp @@ -60,8 +60,8 @@ TouchScreen ts = TouchScreen(XP, YP, XM, YM, 300); #include #include -//void showmsgXY(byte x, byte y, byte sz, char colour, const char *msg) -void showmsgXY(byte x, byte y, byte sz, char colour, char *msg) +//void showmsgXY(byte x, byte y, byte sz, uint16_t colour, const char *msg) +void showmsgXY(byte x, byte y, byte sz, uint16_t colour, char *msg) { tft.setFont(); tft.setFont(&Arial9pt7b);