qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
To: qemu-devel@nongnu.org
Cc: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>,
	John Arbuckle <programmingkidx@gmail.com>,
	Gerd Hoffmann <kraxel@redhat.com>
Subject: [Qemu-devel] [PATCH 1/1] hw/audio/sb16.c: missing break statement
Date: Thu,  8 Feb 2018 08:57:54 -0200	[thread overview]
Message-ID: <20180208105754.19924-1-danielhb@linux.vnet.ibm.com> (raw)

This patch adds a break in the switch() statement of complete(),
value 0x42:

    case 0x42:              /* FT2 sets output freq with this, go figure */
        qemu_log_mask(LOG_UNIMP, "cmd 0x42 might not do what it think it"
                      " should\n");
        break; <-------
    case 0x41:

The issue was found by Coverity (#1385841):

    CID 1385841:  Control flow issues  (MISSING_BREAK)
    The case for value "66" is not terminated by a 'break' statement.

Fixes: 8ec660b80e ("hw/audio/sb16.c: change dolog() to qemu_log_mask()")
Signed-off-by: Daniel Henrique Barboza <danielhb@linux.vnet.ibm.com>
CC: John Arbuckle <programmingkidx@gmail.com>
CC: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/audio/sb16.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/hw/audio/sb16.c b/hw/audio/sb16.c
index 31de264ab7..b2fdcd8437 100644
--- a/hw/audio/sb16.c
+++ b/hw/audio/sb16.c
@@ -744,6 +744,7 @@ static void complete (SB16State *s)
         case 0x42:              /* FT2 sets output freq with this, go figure */
             qemu_log_mask(LOG_UNIMP, "cmd 0x42 might not do what it think it"
                           " should\n");
+            break;
         case 0x41:
             s->freq = dsp_get_hilo (s);
             ldebug ("set freq %d\n", s->freq);
-- 
2.14.3

             reply	other threads:[~2018-02-08 10:58 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-02-08 10:57 Daniel Henrique Barboza [this message]
2018-02-08 12:15 ` [Qemu-devel] [PATCH 1/1] hw/audio/sb16.c: missing break statement Philippe Mathieu-Daudé
2018-02-08 13:01   ` Peter Maydell
2018-02-08 13:16     ` Philippe Mathieu-Daudé
2018-02-08 13:34       ` Philippe Mathieu-Daudé
2018-02-08 13:51         ` Peter Maydell
2018-02-08 13:08   ` Daniel P. Berrangé
2018-02-08 14:11   ` Daniel Henrique Barboza

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=20180208105754.19924-1-danielhb@linux.vnet.ibm.com \
    --to=danielhb@linux.vnet.ibm.com \
    --cc=kraxel@redhat.com \
    --cc=programmingkidx@gmail.com \
    --cc=qemu-devel@nongnu.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;
as well as URLs for NNTP newsgroup(s).