From b9cdeb56dfa9539ea8df42d6bb5b315057ba8c10 Mon Sep 17 00:00:00 2001 From: Doug Torrance Date: Mon, 14 Aug 2017 18:49:27 -0400 Subject: [PATCH] wmmoonclock: Use unsigned char in mask bitmap to avoid overflow warnings. --- wmmoonclock/src/wmMoonClock.c | 4 ++-- wmmoonclock/src/wmMoonClock_mask.xbm | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/wmmoonclock/src/wmMoonClock.c b/wmmoonclock/src/wmMoonClock.c index e5316d0..d7bae22 100644 --- a/wmmoonclock/src/wmMoonClock.c +++ b/wmmoonclock/src/wmMoonClock.c @@ -180,9 +180,9 @@ int main(int argc, char *argv[]) { initXwindow(argc, argv); if ((DisplayDepth <= 8)||UseLowColorPixmap) - openXwindow(argc, argv, wmMoonClock_masterLow, wmMoonClock_mask_bits, wmMoonClock_mask_width, wmMoonClock_mask_height, BackColor, LabelColor, DataColor); + openXwindow(argc, argv, wmMoonClock_masterLow, (char *)wmMoonClock_mask_bits, wmMoonClock_mask_width, wmMoonClock_mask_height, BackColor, LabelColor, DataColor); else - openXwindow(argc, argv, wmMoonClock_master, wmMoonClock_mask_bits, wmMoonClock_mask_width, wmMoonClock_mask_height, BackColor, LabelColor, DataColor); + openXwindow(argc, argv, wmMoonClock_master, (char *)wmMoonClock_mask_bits, wmMoonClock_mask_width, wmMoonClock_mask_height, BackColor, LabelColor, DataColor); diff --git a/wmmoonclock/src/wmMoonClock_mask.xbm b/wmmoonclock/src/wmMoonClock_mask.xbm index 1b0181f..1a4efc5 100644 --- a/wmmoonclock/src/wmMoonClock_mask.xbm +++ b/wmmoonclock/src/wmMoonClock_mask.xbm @@ -1,6 +1,6 @@ #define wmMoonClock_mask_width 64 #define wmMoonClock_mask_height 64 -static char wmMoonClock_mask_bits[] = { +static unsigned char wmMoonClock_mask_bits[] = { 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, 0x00,0x00,0xf0,0xff,0xff,0xff,0xff,0xff,0xff,0x0f,0xf0,0xff,0xff,0xff,0xff,