From 22dffb81ad0b63645d528c1af77e89decd48bbb1 Mon Sep 17 00:00:00 2001 From: Christophe Fergeau Date: Sun, 19 Feb 2012 23:39:30 +0100 Subject: [PATCH] mingw: fix signed/unsigned comparison warning DWORD is an unsigned long, but it's assigned -1 in various places. mingw warns when comparing a DWORD value against -1. This commit casts the -1 to DWORD to avoid the warning. --- vdagent/desktop_layout.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vdagent/desktop_layout.cpp b/vdagent/desktop_layout.cpp index b5295c1..6e255fc 100644 --- a/vdagent/desktop_layout.cpp +++ b/vdagent/desktop_layout.cpp @@ -263,7 +263,7 @@ bool DesktopLayout::init_dev_mode(LPCTSTR dev_name, DEVMODE* dev_mode, DisplayMo best = i; } } - if (best == -1 || !EnumDisplaySettings(dev_name, best, dev_mode)) { + if (best == (DWORD)-1 || !EnumDisplaySettings(dev_name, best, dev_mode)) { return false; } dev_mode->dmFields = DM_BITSPERPEL | DM_PELSWIDTH | DM_PELSHEIGHT;