Skip to contentSkip to conversation

xf86drm: fix sign-compare warning

PATCH Applied Grazvydas Ignotas 2 participants 2 messages Dec 11, 2016 – Dec 12, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 xf86drm: fix sign-compare warning

xf86drm.c:3601:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]

     while (expected < sizeof(match)) {
                     ^
---
 xf86drm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
xf86drm.c +1 -1
index 2e8c956..b5eeeb0 100644
@@ -3582,7 +3582,7 @@ char *drmGetDeviceNameFromFd2(int fd)
     FILE *f;
     char buf[512];
     static const char match[9] = "\nDEVNAME=";
-    int expected = 1;
+    size_t expected = 1;
 
 
     if (fstat(fd, &sbuf))
Signature · 6 lines
2.7.4

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel