diff mbox

[libdrm] xf86drm: fix sign-compare warning

Message ID 1481479437-30537-1-git-send-email-notasas@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Grazvydas Ignotas Dec. 11, 2016, 6:03 p.m. UTC
xf86drm.c:3601:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
     while (expected < sizeof(match)) {
                     ^

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

Comments

Emil Velikov Dec. 12, 2016, 2:07 p.m. UTC | #1
On 11 December 2016 at 18:03, Grazvydas Ignotas <notasas@gmail.com> wrote:
> xf86drm.c:3601:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
>      while (expected < sizeof(match)) {
>                      ^
>
Pushed to master.

Thanks !
Emil
diff mbox

Patch

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))