diff options
author | Thierry Reding <treding@nvidia.com> | 2014-10-22 17:02:33 +0200 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2016-07-04 11:34:48 +0200 |
commit | 6eba6dd04f08243922f121970e8defe88ad3a866 (patch) | |
tree | 7e78158f5a37a099bc7456f52873c5e397def1aa | |
parent | 9e3774a4606b826921f1c0ea7d8afd8f91049758 (diff) |
kms-swrast: Fix build warningstaging/fixes
drmPrimeHandleToFD() takes a pointer to an int as the last argument.
Passing in a pointer to an unsigned int (winsys_handle.handle) causes
the compiler to warn about mismatched signedness.
Signed-off-by: Thierry Reding <treding@nvidia.com>
-rw-r--r-- | src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c b/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c index 21ac0d7dae83..02badfb5c4fc 100644 --- a/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c +++ b/src/gallium/winsys/sw/kms-dri/kms_dri_sw_winsys.c @@ -310,6 +310,7 @@ kms_sw_displaytarget_get_handle(struct sw_winsys *winsys, { struct kms_sw_winsys *kms_sw = kms_sw_winsys(winsys); struct kms_sw_displaytarget *kms_sw_dt = kms_sw_displaytarget(dt); + int fd; switch(whandle->type) { case DRM_API_HANDLE_TYPE_KMS: @@ -319,8 +320,9 @@ kms_sw_displaytarget_get_handle(struct sw_winsys *winsys, return TRUE; case DRM_API_HANDLE_TYPE_FD: if (!drmPrimeHandleToFD(kms_sw->fd, kms_sw_dt->handle, - DRM_CLOEXEC, (int*)&whandle->handle)) { + DRM_CLOEXEC, &fd)) { whandle->stride = kms_sw_dt->stride; + whandle->handle = fd; whandle->offset = 0; return TRUE; } |