Linux bluetooth development
 help / color / mirror / Atom feed
From: David Binderman <dcb314@hotmail.com>
To: "linux-bluetooth@vger.kernel.org" <linux-bluetooth@vger.kernel.org>
Subject: bluez-5.10/monitor/packet.c:4335: possible missing break ?
Date: Tue, 5 Nov 2013 15:02:32 +0000	[thread overview]
Message-ID: <DUB118-W372AC521B8229C59C076809CF10@phx.gbl> (raw)

Hello there,

I just ran the static analysis checker "cppcheck" over the source code of bluez-5.10

It said

[monitor/packet.c:4335] -> [monitor/packet.c:4338]: (warning) Variable 'str' is reassigned a value
 before the old one has been used. 'break;' missing?

Source code is

    case 0x03:
        str = "Allow Scan Request from White List Only, "
            "Allow Connect Request from White List Only";
    default:
        str = "Reserved";
        break;

Suggest add a break statement to the 0x03 case.

Regards

David Binderman 		 	   		  

             reply	other threads:[~2013-11-05 15:02 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-11-05 15:02 David Binderman [this message]
2013-11-06  8:15 ` bluez-5.10/monitor/packet.c:4335: possible missing break ? Johan Hedberg

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=DUB118-W372AC521B8229C59C076809CF10@phx.gbl \
    --to=dcb314@hotmail.com \
    --cc=linux-bluetooth@vger.kernel.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