# Re: \[git patches\] two warning fixes

- From: Stephen Hemminger \<hidden\>
- Date: 2007-07-19 18:20:52 
- List: linux-fbdev
- Page: https://ratatoskr.run/linux-fbdev/2007/07/13457460
- Thread: https://ratatoskr.run/linux-fbdev/2007/07/982045/t.md

```text
On Thu, 19 Jul 2007 11:04:29 -0700 (PDT)
Linus Torvalds [ref] wrote:

> 
> 
> On Thu, 19 Jul 2007, Krzysztof Halasa wrote:
> >
> > Jeff Garzik [ref] writes:
> > 
> > > My overall goal is killing useless warnings
> > > that continually obscure real ones.
> > 
> > Precisely, the goal should be to make must_check (and similar things)
> > warn only in real cases.
> 
> .. the problem with that mentality is that it's not how people work.
> 
> People shut up warnings by adding code.
> 
> Adding code tends to add bugs.
> 
> People don't generally think "maybe that warning was bogus".
> 
> More people *should* generally ask themselves: "was the warning worth it?" 
> and then, if the answer is "no", they shouldn't add code, they should 
> remove the thing that causes the warning in the first place.
> 
> For example, for compiler options, the correct thign is often to just say 
> "that option was broken", and not use "-fsign-warning", for example. We've 
> literally have had bugs *added* because people "fixed" a sign warning. 
> More than once, in fact.
> 
> Every time you see a warning, you should ask yourself: is the warning 
> interesting, correct and valid? And if it isn't all three, then the 
> problem is whatever *causes* the warning, not the code itself.
> 
> 			Linus

Can we ever get the gcc developers to fix all the bogus warnings
about variables that "might not be set"?

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
```
