From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933253AbbI3V7t (ORCPT ); Wed, 30 Sep 2015 17:59:49 -0400 Received: from bombadil.infradead.org ([198.137.202.9]:48555 "EHLO bombadil.infradead.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S932958AbbI3Vze (ORCPT ); Wed, 30 Sep 2015 17:55:34 -0400 From: Arnaldo Carvalho de Melo To: Ingo Molnar Cc: linux-kernel@vger.kernel.org, Jiri Olsa , Jiri Olsa , Arnaldo Carvalho de Melo Subject: [PATCH 01/16] tools: Fix shadowed declaration in err.h Date: Wed, 30 Sep 2015 18:54:56 -0300 Message-Id: <1443650111-31140-2-git-send-email-acme@kernel.org> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1443650111-31140-1-git-send-email-acme@kernel.org> References: <1443650111-31140-1-git-send-email-acme@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org See http://www.infradead.org/rpr.html Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Jiri Olsa 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 Link: http://lkml.kernel.org/n/tip-i9mdgdbrgauy3fe76s9rd125@git.kernel.org Reported-by: Vinson Lee [ Use 'error_' instead of 'err' to, visually, not diverge too much from include/linux/err.h ] Signed-off-by: Arnaldo Carvalho de Melo --- 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