From: Cyril Brulebois <kibi@debian.org>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 4/5] xvmc: Silence gcc, adding a cast to work around signedness issues.
Date: Mon, 31 Jan 2011 06:22:38 +0100 [thread overview]
Message-ID: <1296451359-28449-4-git-send-email-kibi@debian.org> (raw)
In-Reply-To: <1296451359-28449-1-git-send-email-kibi@debian.org>
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>
---
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
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx
next prev parent reply other threads:[~2011-01-31 5:22 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-31 5:22 [PATCH 1/5] xvmc: Get rid of unused variables Cyril Brulebois
2011-01-31 5:22 ` [PATCH 2/5] xvmc: Silence gcc, add parentheses around assignment Cyril Brulebois
2011-01-31 5:22 ` [PATCH 3/5] xvmc: Silence gcc, add parentheses around arithmetic Cyril Brulebois
2011-01-31 9:50 ` Chris Wilson
2011-01-31 9:55 ` Julien Cristau
2011-01-31 5:22 ` Cyril Brulebois [this message]
2011-01-31 5:22 ` [PATCH 5/5] xvmc: Stop using uninitialized variable Cyril Brulebois
2011-01-31 10:05 ` Chris Wilson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1296451359-28449-4-git-send-email-kibi@debian.org \
--to=kibi@debian.org \
--cc=intel-gfx@lists.freedesktop.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox