[PATCH 0/1] MR1797: user32/tests: Don't assign const variable to other const (gcc 4.7)
Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> -- https://gitlab.winehq.org/wine/wine/-/merge_requests/1797
From: Fabian Maurer <dark.shadow4(a)web.de> Signed-off-by: Fabian Maurer <dark.shadow4(a)web.de> --- dlls/user32/tests/sysparams.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/dlls/user32/tests/sysparams.c b/dlls/user32/tests/sysparams.c index a53c43b391a..064733207b4 100644 --- a/dlls/user32/tests/sysparams.c +++ b/dlls/user32/tests/sysparams.c @@ -3120,7 +3120,8 @@ static void test_EnumDisplaySettings(void) { static const DWORD mode_fields = DM_DISPLAYORIENTATION | DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFLAGS | DM_DISPLAYFREQUENCY; - static const DWORD setting_fields = mode_fields | DM_POSITION; + static const DWORD setting_fields = DM_DISPLAYORIENTATION | DM_BITSPERPEL | + DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFLAGS | DM_DISPLAYFREQUENCY | DM_POSITION; CHAR primary_adapter[CCHDEVICENAME]; DPI_AWARENESS_CONTEXT ctx = NULL; DWORD err, val, device, mode; -- GitLab https://gitlab.winehq.org/wine/wine/-/merge_requests/1797
Alex Henrie (@alexhenrie) commented about dlls/user32/tests/sysparams.c:
{ static const DWORD mode_fields = DM_DISPLAYORIENTATION | DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFLAGS | DM_DISPLAYFREQUENCY; - static const DWORD setting_fields = mode_fields | DM_POSITION; + static const DWORD setting_fields = DM_DISPLAYORIENTATION | DM_BITSPERPEL | + DM_PELSWIDTH | DM_PELSHEIGHT | DM_DISPLAYFLAGS | DM_DISPLAYFREQUENCY | DM_POSITION; How about turning these two constants into #defines?
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/1797#note_19543
On Tue Dec 13 03:25:25 2022 +0000, Alex Henrie wrote:
How about turning these two constants into #defines? We could do it like that, but I kinda prefer having constants over defines.
-- https://gitlab.winehq.org/wine/wine/-/merge_requests/1797#note_19544
participants (3)
-
Alex Henrie (@alexhenrie) -
Fabian Maurer -
Fabian Maurer (@DarkShadow44)