diff options
author | Cyril Brulebois <kibi@debian.org> | 2011-01-31 06:22:38 +0100 |
---|---|---|
committer | Owain G. Ainsworth <oga@openbsd.org> | 2011-03-16 20:16:14 +0000 |
commit | 5609f8e235fd30ae3e8c71a31727ce49bce57c24 (patch) | |
tree | 07a15cd0ce0bc2ce80dc30325122f8ea59a888a9 | |
parent | 4a9abdf9beee1a0f825934a7afdecc9f277bfe97 (diff) |
xvmc: Silence gcc, adding a cast to work around signedness issues.
Both exported XvMCPutSlice/XvMCPutSlice2 functions have a prototype with a
parameter whose signedness differs from the one in the put_slice/put_slice2
functions they call. Make it unsigned through a cast.
Get rid of this accordingly with CFLAGS="-Wall -Werror":
| CC intel_xvmc.lo
| cc1: warnings being treated as errors
| intel_xvmc.c: In function ‘XvMCSyncSurface’:
| intel_xvmc.c:677: error: ‘ret’ may be used uninitialized in this function
| intel_xvmc.c:672: note: ‘ret’ was declared here
Signed-off-by: Cyril Brulebois <kibi@debian.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
(cherry picked from commit 86284abafbe1364f82509d2656c82ba11cdce6cc)
Signed-off-by: Owain G. Ainsworth <oga@openbsd.org>
-rw-r--r-- | src/xvmc/intel_xvmc.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/xvmc/intel_xvmc.c b/src/xvmc/intel_xvmc.c index 339c1331..d89cda22 100644 --- a/src/xvmc/intel_xvmc.c +++ b/src/xvmc/intel_xvmc.c @@ -1058,7 +1058,7 @@ _X_EXPORT Status XvMCLoadQMatrix(Display * display, XvMCContext * context, _X_EXPORT Status XvMCPutSlice(Display * display, XvMCContext * context, char *slice, int nbytes) { - if (xvmc_driver->put_slice(display, context, slice, nbytes)) { + if (xvmc_driver->put_slice(display, context, (unsigned char *) slice, nbytes)) { XVMC_ERR("PutSlice fail\n"); return BadValue; } @@ -1069,7 +1069,7 @@ _X_EXPORT Status XvMCPutSlice2(Display * display, XvMCContext * context, char *slice, int nbytes, int slice_code) { if (xvmc_driver->put_slice2 - (display, context, slice, nbytes, slice_code)) { + (display, context, (unsigned char *) slice, nbytes, slice_code)) { XVMC_ERR("PutSlice2 fail\n"); return BadValue; } |