From 58fe3afff527fd09cd729beea22e6ebfce82379a Mon Sep 17 00:00:00 2001 From: Alexandre Julliard Date: Thu, 10 Sep 2015 19:47:24 +0900 Subject: [PATCH] gdi32: Add an intermediate pointer to avoid a compiler warning. --- dlls/gdi32/bitblt.c | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/dlls/gdi32/bitblt.c b/dlls/gdi32/bitblt.c index 762ca0f6180..08ebfd9966a 100644 --- a/dlls/gdi32/bitblt.c +++ b/dlls/gdi32/bitblt.c @@ -224,20 +224,21 @@ static DWORD blend_bits( const BITMAPINFO *src_info, const struct gdi_image_bits /* helper to retrieve either both colors or only the background color for monochrome blits */ static void get_mono_dc_colors( HDC hdc, BITMAPINFO *info, int count ) { + RGBQUAD *colors = info->bmiColors; COLORREF color = GetBkColor( hdc ); - info->bmiColors[count - 1].rgbRed = GetRValue( color ); - info->bmiColors[count - 1].rgbGreen = GetGValue( color ); - info->bmiColors[count - 1].rgbBlue = GetBValue( color ); - info->bmiColors[count - 1].rgbReserved = 0; + colors[count - 1].rgbRed = GetRValue( color ); + colors[count - 1].rgbGreen = GetGValue( color ); + colors[count - 1].rgbBlue = GetBValue( color ); + colors[count - 1].rgbReserved = 0; if (count > 1) { color = GetTextColor( hdc ); - info->bmiColors[0].rgbRed = GetRValue( color ); - info->bmiColors[0].rgbGreen = GetGValue( color ); - info->bmiColors[0].rgbBlue = GetBValue( color ); - info->bmiColors[0].rgbReserved = 0; + colors[0].rgbRed = GetRValue( color ); + colors[0].rgbGreen = GetGValue( color ); + colors[0].rgbBlue = GetBValue( color ); + colors[0].rgbReserved = 0; } info->bmiHeader.biClrUsed = count; }