summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlan Coopersmith <alan.coopersmith@oracle.com>2022-08-20 10:45:07 -0700
committerAlan Coopersmith <alan.coopersmith@oracle.com>2022-08-20 10:45:07 -0700
commit1f6854c919c27c7bf640000a3c0851116779f7a4 (patch)
tree2faafcf88f41024417394318b2746abf03bdac21
parent2e27589966d6653e63b56e29b0bea83f722c4c33 (diff)
Fix -Wsign-compare warning
XF86VMode.c: In function ‘XF86VidModeGetModeLine’: XF86VMode.c:270:25: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (modeline->privsize < (INT_MAX / sizeof(INT32))) ^ Signed-off-by: Alan Coopersmith <alan.coopersmith@oracle.com>
-rw-r--r--src/XF86VMode.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/XF86VMode.c b/src/XF86VMode.c
index 00eeb26..1940e08 100644
--- a/src/XF86VMode.c
+++ b/src/XF86VMode.c
@@ -267,7 +267,7 @@ XF86VidModeGetModeLine(Display* dpy, int screen, int* dotclock,
}
if (modeline->privsize > 0) {
- if (modeline->privsize < (INT_MAX / sizeof(INT32)))
+ if ((unsigned) modeline->privsize < (INT_MAX / sizeof(INT32)))
modeline->private = Xcalloc(modeline->privsize, sizeof(INT32));
else
modeline->private = NULL;