Linux ATA/IDE development
 help / color / mirror / Atom feed
From: Jean Delvare <khali@linux-fr.org>
To: David Miller <davem@davemloft.net>
Cc: bzolnier@gmail.com, linux-ide@vger.kernel.org, petkovbb@googlemail.com
Subject: Re: [PATCH] IDE: Silent compiler warning in ide_pio_bytes()
Date: Tue, 23 Jun 2009 11:52:07 +0200	[thread overview]
Message-ID: <20090623115207.58c4ff59@hyperion.delvare> (raw)
In-Reply-To: <20090623.023211.06996077.davem@davemloft.net>

On Tue, 23 Jun 2009 02:32:11 -0700 (PDT), David Miller wrote:
> From: Jean Delvare <khali@linux-fr.org>
> Date: Tue, 23 Jun 2009 08:53:24 +0200
> 
> > I fear somebody else will have to do that. I personally think
> > uninitialized_var() should not have been invented, I don't want to have
> > my name associated with any of its uses for it will inevitably lead to
> > bugs in the future.
> > 
> > I'll resubmit a patch not fixing the warning (because the rest is still
> > useful I think) but that's about all I can offer.
> 
> The alternative will be that someone will ask "when does the '0' case
> get used" and have to sort through that and potentially ask people
> here on the lists.

The comment I added, /* Silent compiler warning */, should have
answered this question pretty clearly, methinks.

> But you posted and update patch which solves the problem in an
> even nicer way :-)

Is it enough to silent the warning for you? I wasn't for me (gcc
4.3.2), although I expected it to... gcc should be able to see there is
no code path leading to the variable being used uninitialized.

-- 
Jean Delvare

  reply	other threads:[~2009-06-23  9:52 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-06-22 19:10 [PATCH] IDE: Silent compiler warning in ide_pio_bytes() Jean Delvare
2009-06-22 20:55 ` Borislav Petkov
2009-06-22 23:10 ` David Miller
2009-06-23  6:53   ` Jean Delvare
2009-06-23  9:32     ` David Miller
2009-06-23  9:52       ` Jean Delvare [this message]
2009-06-23 10:05         ` David Miller

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=20090623115207.58c4ff59@hyperion.delvare \
    --to=khali@linux-fr.org \
    --cc=bzolnier@gmail.com \
    --cc=davem@davemloft.net \
    --cc=linux-ide@vger.kernel.org \
    --cc=petkovbb@googlemail.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