Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752502AbcDZOwf (ORCPT ); Tue, 26 Apr 2016 10:52:35 -0400 Received: from mail.kernel.org ([198.145.29.136]:46651 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752185AbcDZOwe (ORCPT ); Tue, 26 Apr 2016 10:52:34 -0400 Date: Tue, 26 Apr 2016 23:52:29 +0900 From: Masami Hiramatsu To: Arnaldo Carvalho de Melo Cc: linux-kernel@vger.kernel.org, Namhyung Kim , Peter Zijlstra , Ingo Molnar , Hemant Kumar , Ananth N Mavinakayanahalli Subject: Re: [PATCH perf/core v4 04/19] perf: Add lsdir to read a directory Message-Id: <20160426235229.5ee3acb60dc20f89775152c0@kernel.org> In-Reply-To: <20160426140742.GC11033@kernel.org> References: <20160426090200.11891.43944.stgit@devbox> <20160426090242.11891.79014.stgit@devbox> <20160426134020.GB31483@kernel.org> <20160426140742.GC11033@kernel.org> X-Mailer: Sylpheed 3.4.3 (GTK+ 2.24.28; x86_64-redhat-linux-gnu) Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1439 Lines: 38 On Tue, 26 Apr 2016 11:07:42 -0300 Arnaldo Carvalho de Melo wrote: > Em Tue, Apr 26, 2016 at 10:40:20AM -0300, Arnaldo Carvalho de Melo escreveu: > > Em Tue, Apr 26, 2016 at 06:02:42PM +0900, Masami Hiramatsu escreveu: > > > From: Masami Hiramatsu > > > > > > As a utility function, add lsdir() which reads given > > > directory and store entry name into a strlist. > > > lsdir accepts a filter function so that user can > > > filter out unneeded entries. > > > > > > Signed-off-by: Masami Hiramatsu > > > Signed-off-by: Masami Hiramatsu > > > > Thanks, applied. > > Had to fix it to build on some distros, like ubuntu 12.04: > > alldeps-ubuntu-12.04: FAIL > util/util.h:228:38: error: declaration of 'dirname' shadows a global declaration [-Werror=shadow] > cc1: all warnings being treated as errors > mv: cannot stat `/tmp/build/perf/util/.db-export.o.tmp': No such file or directory > make[3]: *** [/tmp/build/perf/util/db-export.o] Error 1 > make[3]: *** Waiting for unfinished jobs.... > make[2]: *** [util] Error 2 > make[2]: *** [ui] Error 2 > make[1]: *** [/tmp/build/perf/libperf-in.o] Error > make: *** [install-bin] Error 2 > Hmm, I didn't know that the dummy argument can shadow a global declaration. I might be better to rename "dirname" to "dir_name". Thank you, -- Masami Hiramatsu