From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753061AbcBXXW6 (ORCPT ); Wed, 24 Feb 2016 18:22:58 -0500 Received: from mail.kernel.org ([198.145.29.136]:59986 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750937AbcBXXW5 (ORCPT ); Wed, 24 Feb 2016 18:22:57 -0500 Date: Wed, 24 Feb 2016 20:22:51 -0300 From: Arnaldo Carvalho de Melo To: Namhyung Kim Cc: Ingo Molnar , Peter Zijlstra , Jiri Olsa , LKML , David Ahern , Andi Kleen , Stephane Eranian , Wang Nan Subject: Re: [PATCH v7 05/18] perf hists: Introduce hist_entry__filter() Message-ID: <20160224232251.GE8720@kernel.org> References: <1456326830-30456-1-git-send-email-namhyung@kernel.org> <1456326830-30456-6-git-send-email-namhyung@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <1456326830-30456-6-git-send-email-namhyung@kernel.org> X-Url: http://acmel.wordpress.com User-Agent: Mutt/1.5.24 (2015-08-30) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Em Thu, Feb 25, 2016 at 12:13:37AM +0900, Namhyung Kim escreveu: > +static int hist_entry__socket_filter(struct hist_entry *he, int type, const void *arg) > +{ > + int socket = *(const int *)arg; > + > + if (type != HIST_FILTER__SOCKET) > + return -1; > + > + return socket >= 0 && he->socket != socket; 'socket' is a function in sys/socket.h, and in older systems this file, tools/perf/util/sort.c, ends up including that header, causing: CC /tmp/build/perf/util/sort.o cc1: warnings being treated as errors util/sort.c: In function ‘hist_entry__socket_filter’: util/sort.c:479: error: declaration of ‘socket’ shadows a global declaration /usr/include/sys/socket.h:105: error: shadowed declaration is here I fixed it renaming it to 'sk'. - Arnaldo