Skip to content

Use uint16_t for showmsgXY() colour#5

Open
cjmayo wants to merge 1 commit intoDCC-EX:mainfrom
cjmayo:colour
Open

Use uint16_t for showmsgXY() colour#5
cjmayo wants to merge 1 commit intoDCC-EX:mainfrom
cjmayo:colour

Conversation

@cjmayo
Copy link

@cjmayo cjmayo commented Dec 22, 2025

Aligns with Adafruit_GFX setTextColor() that is being used here.

void setTextColor(uint16_t c) { textcolor = textbgcolor = c; }

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");

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");
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant