diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-06 15:29:54 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-03-06 15:29:54 (GMT) |
commit | 7293da8bb72712757786b863b3e5ecd826917916 (patch) | |
tree | 0acc593d65c0ed250414e43684b95b74b1d4b44a /win/tkWinColor.c | |
parent | 7f94543bc8a39f0f426203faef8b5b5a9fa4fb56 (diff) | |
download | tk-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.c | 8 |
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; |