From: Matt Fleming <matt@console-pimps.org>
To: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Cc: matt.fleming@intel.com, Mark Rustad <mark.d.rustad@intel.com>,
linux-efi@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH v2] efi: Resolve some shadow warnings
Date: Mon, 8 Sep 2014 17:08:05 +0100 [thread overview]
Message-ID: <20140908160805.GT3001@console-pimps.org> (raw)
In-Reply-To: <1410008573-444-1-git-send-email-jeffrey.t.kirsher@intel.com>
On Sat, 06 Sep, at 06:02:53AM, Jeff Kirsher wrote:
> From: Mark Rustad <mark.d.rustad@intel.com>
>
> It is a really bad idea to declare variables or parameters that
> have the same name as common types. It is valid C, but it gets
> surprising if a macro expansion attempts to declare an inner
> local with that type. Change the local names to eliminate the
> hazard.
>
> Change s16 => str16, s8 => str8.
>
> This resolves warnings seen when using W=2 during make, for instance:
>
> drivers/firmware/efi/vars.c: In function ‘dup_variable_bug’:
> drivers/firmware/efi/vars.c:324:44: warning: declaration of ‘s16’ shadows a global declaration [-Wshadow]
> static void dup_variable_bug(efi_char16_t *s16, efi_guid_t *vendor_guid,
>
> drivers/firmware/efi/vars.c:328:8: warning: declaration of ‘s8’ shadows a global declaration [-Wshadow]
> char *s8;
>
> Signed-off-by: Mark Rustad <mark.d.rustad@intel.com>
> Signed-off-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>
Thanks Jeff, Mark, applied.
--
Matt Fleming, Intel Open Source Technology Center
prev parent reply other threads:[~2014-09-08 16:08 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-09-06 13:02 Jeff Kirsher
2014-09-08 16:08 ` Matt Fleming [this message]
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=20140908160805.GT3001@console-pimps.org \
--to=matt@console-pimps.org \
--cc=jeffrey.t.kirsher@intel.com \
--cc=linux-efi@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mark.d.rustad@intel.com \
--cc=matt.fleming@intel.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
all inboxes | Powered by JetHome®