dcavalca / rpms / qemu

Forked from rpms/qemu a year ago
Clone

Blame 0216-audio-Fix-warning-from-static-code-analysis.patch

5544c1
From eb26fee60bcc7b1191395c21f41c22e5e4f24182 Mon Sep 17 00:00:00 2001
5544c1
From: Stefan Weil <sw@weilnetz.de>
5544c1
Date: Mon, 3 Sep 2012 09:25:16 +0000
5544c1
Subject: [PATCH] audio: Fix warning from static code analysis
5544c1
5544c1
smatch report:
5544c1
audio/audio_template.h:416 AUD_open_out(18) warn:
5544c1
 variable dereferenced before check 'as' (see line 414)
5544c1
5544c1
Moving the ldebug statement after the statement which checks 'as'
5544c1
fixes that warning.
5544c1
5544c1
Signed-off-by: Stefan Weil <sw@weilnetz.de>
5544c1
Signed-off-by: malc <av1474@comtv.ru>
5544c1
(cherry picked from commit 93b6599734f81328ee3d608f57667742cafeea72)
5544c1
5544c1
Signed-off-by: Michael Roth <mdroth@linux.vnet.ibm.com>
5544c1
---
5544c1
 audio/audio_template.h | 6 +++---
5544c1
 1 file changed, 3 insertions(+), 3 deletions(-)
5544c1
5544c1
diff --git a/audio/audio_template.h b/audio/audio_template.h
5544c1
index 519432a..16f7880 100644
5544c1
--- a/audio/audio_template.h
5544c1
+++ b/audio/audio_template.h
5544c1
@@ -410,15 +410,15 @@ SW *glue (AUD_open_, TYPE) (
5544c1
     SW *old_sw = NULL;
5544c1
 #endif
5544c1
 
5544c1
-    ldebug ("open %s, freq %d, nchannels %d, fmt %d\n",
5544c1
-            name, as->freq, as->nchannels, as->fmt);
5544c1
-
5544c1
     if (audio_bug (AUDIO_FUNC, !card || !name || !callback_fn || !as)) {
5544c1
         dolog ("card=%p name=%p callback_fn=%p as=%p\n",
5544c1
                card, name, callback_fn, as);
5544c1
         goto fail;
5544c1
     }
5544c1
 
5544c1
+    ldebug ("open %s, freq %d, nchannels %d, fmt %d\n",
5544c1
+            name, as->freq, as->nchannels, as->fmt);
5544c1
+
5544c1
     if (audio_bug (AUDIO_FUNC, audio_validate_settings (as))) {
5544c1
         audio_print_settings (as);
5544c1
         goto fail;
5544c1
-- 
5544c1
1.7.12.1
5544c1