[Crosstoolchain-logs] [device-tree-compiler] 118/198: libfdt: avoid shadowing "err" in FDT_CHECK_HEADER
Hector Oron
zumbi at moszumanska.debian.org
Thu Dec 8 17:06:59 UTC 2016
This is an automated email from the git hooks/post-receive script.
zumbi pushed a commit to branch upstream/1.4.x
in repository device-tree-compiler.
commit 89c9af54816728f56b8da1f2742b4d4db29cf538
Author: Florian Fainelli <f.fainelli at gmail.com>
Date: Fri Jan 24 17:19:11 2014 -0800
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 at gmail.com>
---
libfdt/libfdt_internal.h | 6 +++---
1 file 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);
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/crosstoolchain/device-tree-compiler.git
More information about the Crosstoolchain-logs
mailing list