public inbox for intel-gfx@lists.freedesktop.org
 help / color / mirror / Atom feed
From: Cyril Brulebois <kibi@debian.org>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 5/5] xvmc: Stop using uninitialized variable.
Date: Mon, 31 Jan 2011 06:22:39 +0100	[thread overview]
Message-ID: <1296451359-28449-5-git-send-email-kibi@debian.org> (raw)
In-Reply-To: <1296451359-28449-1-git-send-email-kibi@debian.org>

The actual code was removed in 5f64122551, where the get_surface_status
driver callback was dropped. Just return Success if there were no issues
with the parameter.

Get rid of the following 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, 1 insertions(+), 3 deletions(-)

diff --git a/src/xvmc/intel_xvmc.c b/src/xvmc/intel_xvmc.c
index d89cda2..1b96945 100644
--- a/src/xvmc/intel_xvmc.c
+++ b/src/xvmc/intel_xvmc.c
@@ -669,12 +669,10 @@ _X_EXPORT Status XvMCPutSurface(Display * display, XvMCSurface * surface,
  */
 _X_EXPORT Status XvMCSyncSurface(Display * display, XvMCSurface * surface)
 {
-	Status ret;
-
 	if (!display || !surface)
 		return XvMCBadSurface;
 
-	return ret;
+	return Success;
 }
 
 /*
-- 
1.7.2.3

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  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 ` [PATCH 4/5] xvmc: Silence gcc, adding a cast to work around signedness issues Cyril Brulebois
2011-01-31  5:22 ` Cyril Brulebois [this message]
2011-01-31 10:05   ` [PATCH 5/5] xvmc: Stop using uninitialized variable 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-5-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