All of lore.kernel.org
 help / color / mirror / Atom feed
From: Henrique de Moraes Holschuh <hmh@hmh.eng.br>
To: Jean Sacren <sakiwit@gmail.com>
Cc: Linux ACPI <linux-acpi@vger.kernel.org>
Subject: Re: [PATCH 1/1] acpi: Fix warning: 'num_cpus' may be used uninitialized in this function
Date: Sat, 11 Sep 2010 13:40:37 -0300	[thread overview]
Message-ID: <20100911164037.GB12989@khazad-dum.debian.net> (raw)
In-Reply-To: <20100911062437.GA18711@mail.gmail.com>

On Sat, 11 Sep 2010, Jean Sacren wrote:
> warning: 'num_cpus' may be used uninitialized in this function
> 
> Initialize 'num_cpus' variable to zero so that gcc doesn't complain.

acpi_pad_pur() is referenced only once, so it should end up inlined, at
which point gcc really has no excuse to not determine with perfect
confidence whether num_cpus is being used unitialized or not.

Looking at the code, it realy does look like a false positive.

Are you using a recent gcc?

-- 
  "One disk to rule them all, One disk to find them. One disk to bring
  them all and in the darkness grind them. In the Land of Redmond
  where the shadows lie." -- The Silicon Valley Tarot
  Henrique Holschuh

  reply	other threads:[~2010-09-11 16:46 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-11  6:22 [PATCH 0/1] " Jean Sacren
2010-09-11  6:24 ` [PATCH 1/1] " Jean Sacren
2010-09-11 16:40   ` Henrique de Moraes Holschuh [this message]
2010-09-13  0:39     ` Jean Sacren
2010-09-13 21:01       ` Henrique de Moraes Holschuh

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=20100911164037.GB12989@khazad-dum.debian.net \
    --to=hmh@hmh.eng.br \
    --cc=linux-acpi@vger.kernel.org \
    --cc=sakiwit@gmail.com \
    --subject='Re: [PATCH 1/1] acpi: Fix warning: '\''num_cpus'\'' may be used uninitialized in this function' \
    /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

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.