[PATCH] Avoid a shadowing declaration warning with GCC 4.4
Jose E. Marchesi
jose.marchesi at oracle.com
Fri Oct 9 10:51:21 UTC 2015
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 at 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 at 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 at 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 at 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);
More information about the elfutils-devel
mailing list