summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Fainelli <f.fainelli@gmail.com>2014-01-24 17:19:11 -0800
committerDavid Gibson <david@gibson.dropbear.id.au>2014-01-25 15:11:20 +1100
commit89c9af54816728f56b8da1f2742b4d4db29cf538 (patch)
treef39acc22da8f4c6a0faec3e4e8d44358bd96b19f
parent6d889343710e0ecb14f87758608708e08df7c8c1 (diff)
downloaddevice-tree-compiler-89c9af54816728f56b8da1f2742b4d4db29cf538.tar.gz
libfdt: avoid shadowing "err" in FDT_CHECK_HEADER
FDT_CHECK_HEADER declares an internal variable named "err" whose name is far too generic and will produce the following -Wshadow warnings: libfdt/fdt_ro.c: In function 'fdt_node_offset_by_compatible': libfdt/fdt_ro.c:555:2: error: declaration of 'err' shadows a previous local [-Werror=shadow] libfdt/fdt_ro.c:553:14: error: shadowed declaration is here [-Werror=shadow] cc1: all warnings being treated as errors Since this variable is only used internally in the macro, rename to __err which should be prefixed enough not to cause new shadow warnings. Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
-rw-r--r--libfdt/libfdt_internal.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/libfdt/libfdt_internal.h b/libfdt/libfdt_internal.h
index 381133b..02cfa6f 100644
--- a/libfdt/libfdt_internal.h
+++ b/libfdt/libfdt_internal.h
@@ -57,9 +57,9 @@
#define FDT_CHECK_HEADER(fdt) \
{ \
- int err; \
- if ((err = fdt_check_header(fdt)) != 0) \
- return err; \
+ int __err; \
+ if ((__err = fdt_check_header(fdt)) != 0) \
+ return __err; \
}
int _fdt_check_node_offset(const void *fdt, int offset);