From: Johan Hedberg <johan.hedberg@gmail.com>
To: Claudio Takahasi <claudio.takahasi@openbossa.org>
Cc: linux-bluetooth@vger.kernel.org
Subject: Re: [PATCH BlueZ] btmgmt: fix used without initialization
Date: Mon, 7 Nov 2011 21:36:48 +0200 [thread overview]
Message-ID: <20111107193648.GA2597@fusion.localdomain> (raw)
In-Reply-To: <1320685115-20542-1-git-send-email-claudio.takahasi@openbossa.org>
Hi Claudio,
On Mon, Nov 07, 2011, Claudio Takahasi wrote:
> This patch fixes the following warning being treated as error:
> mgmt/main.c: In function 'mgmt_process_data':
> mgmt/main.c:508:3: error: 'len' may be used uninitialized in this
> function [-Werror=uninitialized]
> ---
> mgmt/main.c | 6 ++++--
> 1 files changed, 4 insertions(+), 2 deletions(-)
Thanks for the heads-up. Seems like my gcc is buggy since it doesn't
catch this even when I use bootstrap-configure. The original intent of
the code was to have return ret which is what I pushed as a fix (-errno
would be more sophisticated but then it'd make sense to fix several
other places in the code too). Btw, please keep "int err" variables
negative so that we have consistency in the code-base and avoid stupid
bugs.
Johan
next prev parent reply other threads:[~2011-11-07 19:36 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-11-07 16:58 [PATCH BlueZ] btmgmt: fix used without initialization Claudio Takahasi
2011-11-07 19:36 ` Johan Hedberg [this message]
2011-11-07 20:08 ` Anderson Lizardo
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=20111107193648.GA2597@fusion.localdomain \
--to=johan.hedberg@gmail.com \
--cc=claudio.takahasi@openbossa.org \
--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