summaryrefslogtreecommitdiff
path: root/src/xvmc
diff options
context:
space:
mode:
authorCyril Brulebois <kibi@debian.org>2011-01-31 06:22:38 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2011-01-31 10:00:16 +0000
commit86284abafbe1364f82509d2656c82ba11cdce6cc (patch)
treedcecc1ecfca9f30d77bb0015364c5127bb3eb07b /src/xvmc
parentfc2eb64d7a184770ccd708a5b2337a538ca2b9db (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>
Diffstat (limited to 'src/xvmc')
-rw-r--r--src/xvmc/intel_xvmc.c4
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;
}