All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Afzal Mohammed <afzal.mohd.ma@gmail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>,
	Gustavo Padovan <gustavo@padovan.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] Bluetooth: ath3k: Silence uninitialized variable warning
Date: Sat, 23 Apr 2016 07:21:57 +0000	[thread overview]
Message-ID: <20160423072157.GD17913@mwanda> (raw)
In-Reply-To: <20160423064745.GA4826@afzalpc>

On Sat, Apr 23, 2016 at 12:17:45PM +0530, Afzal Mohammed wrote:
> Hi,
> 
> On Fri, Apr 22, 2016 at 01:02:55PM +0300, Dan Carpenter wrote:
> 
> > -	int err, pipe, len, size, count, sent = 0;
> > +	int len = 0;
> > +	int err, pipe, size, count, sent = 0;
> 
> Is there any particular reason to avoid more than 1 variable
> initialization in definition on a single line ?, like,
> 
> 	int err, pipe, size, count, sent = 0, len = 0;
> 
> have observed that none of your uninitialized variable warning fixes
> does as mentioned above.

That sort of initialization is slightly less readable...

regards,
dan carpenter


WARNING: multiple messages have this Message-ID (diff)
From: Dan Carpenter <dan.carpenter@oracle.com>
To: Afzal Mohammed <afzal.mohd.ma@gmail.com>
Cc: Marcel Holtmann <marcel@holtmann.org>,
	Gustavo Padovan <gustavo@padovan.org>,
	Johan Hedberg <johan.hedberg@gmail.com>,
	linux-bluetooth@vger.kernel.org, linux-kernel@vger.kernel.org,
	kernel-janitors@vger.kernel.org
Subject: Re: [patch] Bluetooth: ath3k: Silence uninitialized variable warning
Date: Sat, 23 Apr 2016 10:21:57 +0300	[thread overview]
Message-ID: <20160423072157.GD17913@mwanda> (raw)
In-Reply-To: <20160423064745.GA4826@afzalpc>

On Sat, Apr 23, 2016 at 12:17:45PM +0530, Afzal Mohammed wrote:
> Hi,
> 
> On Fri, Apr 22, 2016 at 01:02:55PM +0300, Dan Carpenter wrote:
> 
> > -	int err, pipe, len, size, count, sent = 0;
> > +	int len = 0;
> > +	int err, pipe, size, count, sent = 0;
> 
> Is there any particular reason to avoid more than 1 variable
> initialization in definition on a single line ?, like,
> 
> 	int err, pipe, size, count, sent = 0, len = 0;
> 
> have observed that none of your uninitialized variable warning fixes
> does as mentioned above.

That sort of initialization is slightly less readable...

regards,
dan carpenter

  reply	other threads:[~2016-04-23  7:21 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-04-22 10:02 [patch] Bluetooth: ath3k: Silence uninitialized variable warning Dan Carpenter
2016-04-22 10:02 ` Dan Carpenter
2016-04-22 10:42 ` Marcel Holtmann
2016-04-22 10:42   ` Marcel Holtmann
2016-04-23  6:47 ` Afzal Mohammed
2016-04-23  6:59   ` Afzal Mohammed
2016-04-23  7:21   ` Dan Carpenter [this message]
2016-04-23  7:21     ` Dan Carpenter

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=20160423072157.GD17913@mwanda \
    --to=dan.carpenter@oracle.com \
    --cc=afzal.mohd.ma@gmail.com \
    --cc=gustavo@padovan.org \
    --cc=johan.hedberg@gmail.com \
    --cc=kernel-janitors@vger.kernel.org \
    --cc=linux-bluetooth@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=marcel@holtmann.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.