[PATCH libdrm] xf86drm: fix sign-compare warning

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



xf86drm.c:3601:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     while (expected < sizeof(match)) {
                     ^

Signed-off-by: Grazvydas Ignotas <notasas@xxxxxxxxx>
---
 xf86drm.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/xf86drm.c b/xf86drm.c
index 2e8c956..b5eeeb0 100644
--- a/xf86drm.c
+++ b/xf86drm.c
@@ -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))
-- 
2.7.4

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux