All of lore.kernel.org
 help / color / mirror / Atom feed
From: Dmitry Torokhov <dmitry.torokhov@gmail.com>
To: Henrik Rydberg <rydberg@bitmath.org>
Cc: Jaswinder Singh Rajput <jaswinder@kernel.org>,
	linux-input@vger.kernel.org
Subject: Re: [PATCH] Input: bcm5974.c initialize raw_w, raw_x and raw_y before it get used
Date: Sun, 13 Sep 2009 21:37:14 -0700	[thread overview]
Message-ID: <20090914043714.GB11854@core.coreip.homeip.net> (raw)
In-Reply-To: <4AACD9E9.4000702@bitmath.org>

On Sun, Sep 13, 2009 at 01:39:21PM +0200, Henrik Rydberg wrote:
> Jaswinder Singh Rajput wrote:
> > On Sun, 2009-09-13 at 01:24 +0200, Henrik Rydberg wrote:
> >> Jaswinder Singh Rajput wrote:
> >>> raw_w, raw_x and raw_y is used uninitialized for !raw_n
> >> Thanks for the heads up, but actually not, since !raw_n also implies
> >> !(ptest > PRESSURE_LOW).
> >>
> > 
> > Then can we move 'if (ptest > PRESSURE_LOW && origin)' stuff to 'if
> > (raw_n)'. If not then my patch is correct.
> 
> Yes, that's it, thanks. So this patch ought to solve the warning cleanly:
> 

Yes, I like this one much better, applied.

> >>
> >>
> >> I wonder how many cpu cycles in the world are spent making compilers happy.
> >>
> > 
> > It is not compiler mistake it is programming/logic mistakes. We should
> > be thankful to compiler to pointing mistakes made by us.
> 

Except in cases when the compiler is wrong...

> The uninitialized-variable warnings have certainly proved their value many times
> over. I was merely reflecting over the fact that the enclosing space of all such
> errors could be made smaller by deduction at compile time.
> 

-- 
Dmitry

  reply	other threads:[~2009-09-14  4:37 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-09-12 17:16 [PATCH] Input: bcm5974.c initialize raw_w, raw_x and raw_y before it get used Jaswinder Singh Rajput
2009-09-12 23:24 ` Henrik Rydberg
2009-09-13  8:31   ` Jaswinder Singh Rajput
2009-09-13 11:39     ` Henrik Rydberg
2009-09-14  4:37       ` Dmitry Torokhov [this message]
2009-09-14  9:00       ` Jaswinder Singh Rajput
2009-09-15 11:23         ` Henrik Rydberg

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=20090914043714.GB11854@core.coreip.homeip.net \
    --to=dmitry.torokhov@gmail.com \
    --cc=jaswinder@kernel.org \
    --cc=linux-input@vger.kernel.org \
    --cc=rydberg@bitmath.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.