* [PATCH] Avoid a shadowing declaration warning with GCC 4.4
@ 2015-10-09 10:51 Jose E. Marchesi
0 siblings, 0 replies; 2+ messages in thread
From: Jose E. Marchesi @ 2015-10-09 10:51 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 1515 bytes --]
Hi. This little patch fixes two warnings raised by GCC 4.4.7:
declaration of ‘check’ shadows a global declaration
commit 885b420ec0973467d7fc3d5719a1d5cda789cf59
Author: Jose E. Marchesi <jose.marchesi@oracle.com>
Date: Fri Oct 9 06:50:30 2015 -0400
Avoid a shadowing declaration warning with GCC 4.4.
Signed-off-by: Jose E. Marchesi <jose.marchesi@oracle.com>
diff --git a/tests/ChangeLog b/tests/ChangeLog
index 66781d0..ae1e9df 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,3 +1,9 @@
+2015-10-09 Jose E. Marchesi <jose.marchesi@oracle.com>
+
+ * elfshphehdr.c (check): Argument `check' renamed to `check_p' to
+ avoid a warning in GCC 4.4.x.
+ (check_elf): Likewise.
+
2015-10-05 Josh Stone <jistone@redhat.com>
* Makefile.am (backtrace-child-biarch): Add AM_V_CC silencer.
diff --git a/tests/elfshphehdr.c b/tests/elfshphehdr.c
index 5f6b96c..16232fe 100644
--- a/tests/elfshphehdr.c
+++ b/tests/elfshphehdr.c
@@ -31,9 +31,9 @@
#include <stdbool.h>
void
-check (const char *msg, bool check)
+check (const char *msg, bool check_p)
{
- if (! check)
+ if (! check_p)
{
fprintf (stderr, "%s FAILED\n", msg);
exit (-1);
@@ -43,9 +43,9 @@ check (const char *msg, bool check)
}
void
-check_elf (const char *msg, bool check)
+check_elf (const char *msg, bool check_p)
{
- if (! check)
+ if (! check_p)
{
fprintf (stderr, "%s: %s\n", msg, elf_errmsg (-1));
exit (-1);
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] Avoid a shadowing declaration warning with GCC 4.4
@ 2015-10-09 13:45 Mark Wielaard
0 siblings, 0 replies; 2+ messages in thread
From: Mark Wielaard @ 2015-10-09 13:45 UTC (permalink / raw)
To: elfutils-devel
[-- Attachment #1: Type: text/plain, Size: 502 bytes --]
On Fri, 2015-10-09 at 12:51 +0200, Jose E. Marchesi wrote:
> Hi. This little patch fixes two warnings raised by GCC 4.4.7:
> declaration of ‘check’ shadows a global declaration
>
> commit 885b420ec0973467d7fc3d5719a1d5cda789cf59
> Author: Jose E. Marchesi <jose.marchesi@oracle.com>
> Date: Fri Oct 9 06:50:30 2015 -0400
>
> Avoid a shadowing declaration warning with GCC 4.4.
Thanks, I saw the same issue and I just pushed an almost similar patch.
Sorry our patches crossed.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2015-10-09 13:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-10-09 10:51 [PATCH] Avoid a shadowing declaration warning with GCC 4.4 Jose E. Marchesi
2015-10-09 13:45 Mark Wielaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).