summaryrefslogtreecommitdiff
path: root/vdagent
diff options
context:
space:
mode:
authorChristophe Fergeau <cfergeau@redhat.com>2012-02-19 23:39:30 +0100
committerChristophe Fergeau <cfergeau@redhat.com>2012-03-01 12:59:05 +0100
commit22dffb81ad0b63645d528c1af77e89decd48bbb1 (patch)
treea571129b97b1e89f955d2e520459a409e81f4c59 /vdagent
parent92583e91d4b9339901de30d5dda279d468f6f7bb (diff)
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.
Diffstat (limited to 'vdagent')
-rw-r--r--vdagent/desktop_layout.cpp2
1 files changed, 1 insertions, 1 deletions
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;