linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [tip:perf/core] tools: Fix shadowed declaration in err.h
@ 2015-10-01  7:09 tip-bot for Jiri Olsa
  0 siblings, 0 replies; only message in thread
From: tip-bot for Jiri Olsa @ 2015-10-01  7:09 UTC (permalink / raw)
  To: linux-tip-commits
  Cc: tglx, hpa, acme, vlee, jolsa, jolsa, linux-kernel, mingo

Commit-ID:  45633a169571e81835ec53fe0c089dd20f3195f1
Gitweb:     http://git.kernel.org/tip/45633a169571e81835ec53fe0c089dd20f3195f1
Author:     Jiri Olsa <jolsa@redhat.com>
AuthorDate: Tue, 29 Sep 2015 16:53:12 +0200
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 30 Sep 2015 18:34:22 -0300

tools: Fix shadowed declaration in err.h

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 c9ada48..bdc3dd8 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)

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2015-10-01  7:10 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-10-01  7:09 [tip:perf/core] tools: Fix shadowed declaration in err.h tip-bot for Jiri Olsa

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 NNTP newsgroup(s).