diff mbox series

[05/11] hw/audio/adlib: Remove unused variable in adlib_callback

Message ID 20210712215535.1471256-6-richard.henderson@linaro.org
State Superseded
Headers show
Series Fixes for clang-13 plus tcg/ppc | expand

Commit Message

Richard Henderson July 12, 2021, 9:55 p.m. UTC
From clang-13:
hw/audio/adlib.c:189:18: error: variable 'net' set but not used \
    [-Werror,-Wunused-but-set-variable]

Cc: Gerd Hoffmann <kraxel@redhat.com>
Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

---
 hw/audio/adlib.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

-- 
2.25.1

Comments

Philippe Mathieu-Daudé July 13, 2021, 4:31 p.m. UTC | #1
On 7/12/21 11:55 PM, Richard Henderson wrote:
> From clang-13:

> hw/audio/adlib.c:189:18: error: variable 'net' set but not used \

>     [-Werror,-Wunused-but-set-variable]

> 

> Cc: Gerd Hoffmann <kraxel@redhat.com>

> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>

> ---

>  hw/audio/adlib.c | 3 +--

>  1 file changed, 1 insertion(+), 2 deletions(-)


Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>
diff mbox series

Patch

diff --git a/hw/audio/adlib.c b/hw/audio/adlib.c
index 42d50d2fdc..5f979b1487 100644
--- a/hw/audio/adlib.c
+++ b/hw/audio/adlib.c
@@ -186,7 +186,7 @@  static int write_audio (AdlibState *s, int samples)
 static void adlib_callback (void *opaque, int free)
 {
     AdlibState *s = opaque;
-    int samples, net = 0, to_play, written;
+    int samples, to_play, written;
 
     samples = free >> SHIFT;
     if (!(s->active && s->enabled) || !samples) {
@@ -219,7 +219,6 @@  static void adlib_callback (void *opaque, int free)
         written = write_audio (s, samples);
 
         if (written) {
-            net += written;
             samples -= written;
             s->pos = (s->pos + written) % s->samples;
         }