mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Takashi Iwai <tiwai@suse.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: Jean Delvare <khali@linux-fr.org>,
	Rufus & Azrael <rufus-azrael@numericable.fr>,
	Linux-kernel Mailing List <linux-kernel@vger.kernel.org>,
	Jaswinder Singh Rajput <jaswinderlinux@gmail.com>
Subject: Re: [2.6.29-rc2-git2] compilation warnings
Date: Tue, 27 Jan 2009 12:49:53 +0100	[thread overview]
Message-ID: <s5hljsxezoe.wl%tiwai@suse.de> (raw)
In-Reply-To: <20090127111631.GB17848@elte.hu>

At Tue, 27 Jan 2009 12:16:31 +0100,
Ingo Molnar wrote:
> 
> 
> * Takashi Iwai <tiwai@suse.de> wrote:
> 
> > At Tue, 27 Jan 2009 09:46:28 +0100,
> > Jean Delvare wrote:
> > > 
> > > On Tue, 27 Jan 2009 08:32:17 +0100, Takashi Iwai wrote:
> > > > At Tue, 27 Jan 2009 08:15:29 +0100,
> > > > Rufus & Azrael wrote:
> > > > > 
> > > > > Here are my compilation warnings for fresh 2.6.29-rc2-git2 kernel :
> > > > > 
> > > > > > sound/pci/hda/hda_codec.c: In function ‘get_empty_pcm_device’:
> > > > > > sound/pci/hda/hda_codec.c:2544: attention : ‘dev’ may be used 
> > > > > > uninitialized in this function
> > > > 
> > > > A bogus warning.  Ignore this.
> > > 
> > > No matter how bogus it is, it should be fixed. Otherwise this is 
> > > wasting the time of users and developers over and over again.
> > 
> > Well, it's a bug of gcc appearing only in a certain version, so most 
> > people won't see it.
> > 
> > Of course, we can put uninitialized_var().  But, I don't basically like 
> > adding it unconditionally...
> 
> People will again and again look at this warning and waste time deciding 
> that "it's a bogus warning" or even report it. As time goes on does the 
> human cost get larger, linearly.
> 
> Furthermore, if everyone in the kernel behaves like that we'll literally 
> have dozens (even hundreds) of build warnings that might be bogus but 
> which also obscure other, real warnings by their sheer mass.

The question is rather how often it's really seen.
I've tested 4 different gcc versions and a couple of other versions
with cross compiling occasionally, and this warning doesn't appear on
any versions.

> The cost of you adding a oneliner annotation is miniscule compared to that 
> and it is a one-time effort. We already spent more energy on discussing 
> this than it would have taken you to annotate it. Please.

Well, did we get a consensus about this?  If yes, I'll follow it, of
course.

Adding uninitialized_var() essentially means to disable the check,
thus a new real bug in future might be overlooked.  This is a bigger
drawback if it's just a warning that appears in only one old buggy gcc
version.

That's why I wrote "adding it *unconditionally*".  If the warning
appears in many gcc versions, it's worth to hide.


thanks,

Takashi

  reply	other threads:[~2009-01-27 11:50 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-27  7:15 Rufus & Azrael
2009-01-27  7:32 ` Takashi Iwai
2009-01-27  8:46   ` Jean Delvare
2009-01-27  9:34     ` Takashi Iwai
2009-01-27 11:16       ` Ingo Molnar
2009-01-27 11:49         ` Takashi Iwai [this message]
2009-01-27 12:48       ` Jean Delvare
2009-01-27 13:06         ` Ingo Molnar
2009-01-27  8:44 ` Jaswinder Singh Rajput
2009-01-27  8:44 ` Jean Delvare
2009-01-27 11:18   ` Ingo Molnar

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=s5hljsxezoe.wl%tiwai@suse.de \
    --to=tiwai@suse.de \
    --cc=jaswinderlinux@gmail.com \
    --cc=khali@linux-fr.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@elte.hu \
    --cc=rufus-azrael@numericable.fr \
    /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

all inboxes | Powered by JetHome®