Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1236819
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 01/16] tools: Fix shadowed declaration in err.h |
| Date | 2015-10-01 00:00 +0200 |
| Message-ID | <qexzS-LW-41@gated-at.bofh.it> (permalink) |
| References | <qexzQ-LW-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
From: Jiri Olsa <jolsa@redhat.com>
The error variable breaks build on CentOS 6.7, due to collision with
global error symbol:
CC util/evlist.o
cc1: warnings being treated as errors
In file included from util/evlist.c:28:
tools/include/linux/err.h: In function ‘ERR_PTR’:
tools/include/linux/err.h:34: error: declaration of ‘error’ shadows a global declaration
util/util.h:135: error: shadowed declaration is here
Using 'error_' name instead to fix it.
Signed-off-by: Jiri Olsa <jolsa@kernel.org>
Link: http://lkml.kernel.org/n/tip-i9mdgdbrgauy3fe76s9rd125@git.kernel.org
Reported-by: Vinson Lee <vlee@twopensource.com>
[ Use 'error_' instead of 'err' to, visually, not diverge too much from include/linux/err.h ]
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/include/linux/err.h | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/tools/include/linux/err.h b/tools/include/linux/err.h
index c9ada48f5156..bdc3dd8131d4 100644
--- a/tools/include/linux/err.h
+++ b/tools/include/linux/err.h
@@ -31,9 +31,9 @@
#define IS_ERR_VALUE(x) unlikely((x) >= (unsigned long)-MAX_ERRNO)
-static inline void * __must_check ERR_PTR(long error)
+static inline void * __must_check ERR_PTR(long error_)
{
- return (void *) error;
+ return (void *) error_;
}
static inline long __must_check PTR_ERR(__force const void *ptr)
--
2.1.0
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[GIT PULL 00/16] perf/core improvements and fixes Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-01 00:00 +0200 [PATCH 15/16] perf list: Remove blank lines, headers when piping output Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-01 00:00 +0200 [PATCH 12/16] perf probe: Show correct source lines of probes on kmodules Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-01 00:00 +0200 [PATCH 16/16] perf tools: By default use the most precise "cycles" hw counter available Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-01 00:00 +0200 [PATCH 02/16] perf tools: Fix shadowed declaration in parse-events.c Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-01 00:00 +0200 [PATCH 09/16] tools lib symbol: Introduce kallsyms2elf_type Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-01 00:00 +0200 [PATCH 04/16] perf report: Amend documentation about max_stack and synthesized callchains Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-01 00:00 +0200 [PATCH 03/16] perf maps: Introduce maps__find_symbol_by_name() Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-01 00:00 +0200 [PATCH 01/16] tools: Fix shadowed declaration in err.h Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-01 00:00 +0200 [PATCH 07/16] perf machine: Add method for common kernel_map(FUNCTION) operation Arnaldo Carvalho de Melo <acme@kernel.org> - 2015-10-01 00:10 +0200 Re: [GIT PULL 00/16] perf/core improvements and fixes Ingo Molnar <mingo@kernel.org> - 2015-10-01 09:10 +0200
csiph-web