From: Gustavo Padovan <gustavo@padovan.org>
To: Andre Guedes <andre.guedes@openbossa.org>
Cc: Szymon Janc <szymon.janc@tieto.com>,
"linux-bluetooth@vger.kernel.org"
<linux-bluetooth@vger.kernel.org>
Subject: Re: [RFC] Bluetooth: Fix compile warning in l2cap_core.c
Date: Wed, 6 Jun 2012 01:38:59 -0300 [thread overview]
Message-ID: <20120606043859.GA2533@joana> (raw)
In-Reply-To: <CACJA=fWSwywNBrZ_-JNjEXa8nhzYi6gwQ8xnrguErRyYc6gh1w@mail.gmail.com>
Hi Andre,
* Andre Guedes <andre.guedes@openbossa.org> [2012-06-05 16:01:42 -0300]:
> Hi Gustavo,
>
> On Mon, Jun 4, 2012 at 4:17 AM, Szymon Janc <szymon.janc@tieto.com> wrote:
> > Hi,
> >
> >> * Andre Guedes <andre.guedes@openbossa.org> [2012-05-31 20:39:16 -0300]:
> >>
> >> > This patch fixes the following warning reported by gcc 4.7.0:
> >> >
> >> > net/bluetooth/l2cap_core.c: In function 'l2cap_config_rsp':
> >> > net/bluetooth/l2cap_core.c:3302:13: warning: 'rfc.max_pdu_size' may be used uninitialized in this function [-Wmaybe-uninitialized]
> >> > net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.max_pdu_size' was declared here
> >> > net/bluetooth/l2cap_core.c:3298:25: warning: 'rfc.monitor_timeout' may be used uninitialized in this function [-Wmaybe-uninitialized]
> >> > net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.monitor_timeout' was declared here
> >> > net/bluetooth/l2cap_core.c:3297:25: warning: 'rfc.retrans_timeout' may be used uninitialized in this function [-Wmaybe-uninitialized]
> >> > net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.retrans_timeout' was declared here
> >> > net/bluetooth/l2cap_core.c:3295:2: warning: 'rfc.mode' may be used uninitialized in this function [-Wmaybe-uninitialized]
> >> > net/bluetooth/l2cap_core.c:3266:24: note: 'rfc.mode' was declared here
> >>
> >> So I think this is a false positive, I've seen this warning here for more than
> >> a month, since I updated to fedora 17.
> >> At some people will disable this warning in the kernel compile process if this
> >> appear in others places in the kernel as false positive too.
> >
> > What if remote device misbehaves and sends bogus L2CAP_CONF_RFC i.e. with wrong length?
>
> I'm not sure this is a false positive. If remote device misbehaves and
> sends bogus L2CAP_CONF_RFC with wrong length (as Szymon said) we go to
> "done" label and 'rfc' is used uninitialized.
Yes, I agree with you guys, but please rebase this against the bluetooth tree
so we can put this in 3.5 and also rename the patch title as we are not fixing
a simple compile warning.
Gustavo
next prev parent reply other threads:[~2012-06-06 4:38 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-05-31 23:39 [RFC] Bluetooth: Fix compile warning in l2cap_core.c Andre Guedes
2012-06-01 7:03 ` Andrei Emeltchenko
2012-06-01 23:09 ` Gustavo Padovan
2012-06-04 7:17 ` Szymon Janc
2012-06-05 19:01 ` Andre Guedes
2012-06-06 4:38 ` Gustavo Padovan [this message]
2012-06-06 7:33 ` Andrei Emeltchenko
2012-06-06 7:58 ` Szymon Janc
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=20120606043859.GA2533@joana \
--to=gustavo@padovan.org \
--cc=andre.guedes@openbossa.org \
--cc=linux-bluetooth@vger.kernel.org \
--cc=szymon.janc@tieto.com \
/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