nouveau: typecast the prime_fd handle when calling nouveau_bo_set_prime
authorEmil Velikov <emil.l.velikov@gmail.com>
Wed, 12 Mar 2014 16:35:10 +0000 (16:35 +0000)
committerEmil Velikov <emil.l.velikov@gmail.com>
Fri, 14 Mar 2014 13:00:01 +0000 (13:00 +0000)
Core drm defines that the handle is of type int, while all drivers
treat it as uint internally. Typecast the value to silence gcc
warning messages and be consistent amongst all drivers.

Signed-off-by: Emil Velikov <emil.l.velikov@gmail.com>
src/gallium/drivers/nouveau/nouveau_screen.c

index f742a94..19892b1 100644 (file)
@@ -123,7 +123,7 @@ nouveau_screen_bo_get_handle(struct pipe_screen *pscreen,
                whandle->handle = bo->handle;
                return TRUE;
        } else if (whandle->type == DRM_API_HANDLE_TYPE_FD) {
-               return nouveau_bo_set_prime(bo, &whandle->handle) == 0;
+               return nouveau_bo_set_prime(bo, (int *)&whandle->handle) == 0;
        } else {
                return FALSE;
        }