gdi32/tests: Avoid variable length arrays (MSVC).

This commit is contained in:
Thomas Faber 2015-02-16 09:14:34 +01:00 committed by Alexandre Julliard
parent ed761920ca
commit 656bc70f80
2 changed files with 3 additions and 3 deletions

View File

@ -1588,7 +1588,7 @@ static BOOL is_black_pen( COLORREF fg, COLORREF bg, int r, int g, int b )
static void test_bitmap_colors( HDC hdc, COLORREF fg, COLORREF bg, int r, int g, int b )
{
static const WORD pattern_bits[] = { 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa, 0x5555, 0xaaaa };
char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors[256] )];
char buffer[FIELD_OFFSET( BITMAPINFO, bmiColors ) + 256 * sizeof(RGBQUAD)];
BITMAPINFO *info = (BITMAPINFO *)buffer;
RGBQUAD *colors = info->bmiColors;
WORD bits[16];

View File

@ -512,7 +512,7 @@ static void test_ps_userstyle(void)
LOGBRUSH lb;
HPEN pen;
INT size, i;
char buffer[offsetof(EXTLOGPEN, elpStyleEntry[16])];
char buffer[offsetof(EXTLOGPEN, elpStyleEntry) + 16 * sizeof(DWORD)];
EXTLOGPEN *ext_pen = (EXTLOGPEN *)buffer;
lb.lbColor = 0x00ff0000;
@ -569,7 +569,7 @@ static void test_ps_userstyle(void)
static void test_brush_pens(void)
{
char buffer[offsetof(EXTLOGPEN, elpStyleEntry[16])];
char buffer[offsetof(EXTLOGPEN, elpStyleEntry) + 16 * sizeof(DWORD)];
EXTLOGPEN *elp = (EXTLOGPEN *)buffer;
LOGBRUSH lb;
HPEN pen = 0;