summaryrefslogtreecommitdiffstats
path: root/win/tkWinColor.c
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-06 15:29:54 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2023-03-06 15:29:54 (GMT)
commit7293da8bb72712757786b863b3e5ecd826917916 (patch)
tree0acc593d65c0ed250414e43684b95b74b1d4b44a /win/tkWinColor.c
parent7f94543bc8a39f0f426203faef8b5b5a9fa4fb56 (diff)
downloadtk-7293da8bb72712757786b863b3e5ecd826917916.zip
tk-7293da8bb72712757786b863b3e5ecd826917916.tar.gz
tk-7293da8bb72712757786b863b3e5ecd826917916.tar.bz2
More -Wconversion C warning fixes
Diffstat (limited to 'win/tkWinColor.c')
-rw-r--r--win/tkWinColor.c8
1 files changed, 4 insertions, 4 deletions
diff --git a/win/tkWinColor.c b/win/tkWinColor.c
index aa5c12b..63af7d9 100644
--- a/win/tkWinColor.c
+++ b/win/tkWinColor.c
@@ -309,13 +309,13 @@ XAllocColor(
PALETTEENTRY entry, closeEntry;
HDC dc = GetDC(NULL);
- entry.peRed = (color->red) >> 8;
- entry.peGreen = (color->green) >> 8;
- entry.peBlue = (color->blue) >> 8;
+ entry.peRed = (BYTE)((color->red) >> 8);
+ entry.peGreen = (BYTE)((color->green) >> 8);
+ entry.peBlue = (BYTE)((color->blue) >> 8);
entry.peFlags = 0;
if (GetDeviceCaps(dc, RASTERCAPS) & RC_PALETTE) {
- unsigned long sizePalette = GetDeviceCaps(dc, SIZEPALETTE);
+ unsigned long sizePalette = (unsigned long)GetDeviceCaps(dc, SIZEPALETTE);
UINT newPixel, closePixel;
int isNew;
size_t refCount;