[Intel-gfx] [PATCH 4/5] xvmc: Silence gcc, adding a cast to work around signedness issues.
Cyril Brulebois
kibi at debian.org
Mon Jan 31 06:22:38 CET 2011
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 at debian.org>
---
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 339c133..d89cda2 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;
}
--
1.7.2.3
More information about the Intel-gfx
mailing list