lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Wed, 2 Dec 2009 09:17:45 +0100
From:	Ingo Molnar <mingo@...e.hu>
To:	Xiao Guangrong <xiaoguangrong@...fujitsu.com>
Cc:	Peter Zijlstra <a.p.zijlstra@...llo.nl>,
	LKML <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH] perf_event: fix compile error


* Xiao Guangrong <xiaoguangrong@...fujitsu.com> wrote:

> cc1: warnings being treated as errors
> builtin-probe.c: In function ???cmd_probe???:
> builtin-probe.c:163: error: unused variable ???fd???
> 
> Signed-off-by: Xiao Guangrong <xiaoguangrong@...fujitsu.com>
> ---
>  tools/perf/builtin-probe.c |    3 ++-
>  1 files changed, 2 insertions(+), 1 deletions(-)
> 
> diff --git a/tools/perf/builtin-probe.c b/tools/perf/builtin-probe.c
> index b5d15cf..64ea038 100644
> --- a/tools/perf/builtin-probe.c
> +++ b/tools/perf/builtin-probe.c
> @@ -160,7 +160,8 @@ static const struct option options[] = {
>  
>  int cmd_probe(int argc, const char **argv, const char *prefix __used)
>  {
> -	int i, j, fd, ret;
> +	int i, j, ret;
> +	int fd __used;
>  	struct probe_point *pp;

i think it's better to initialize it to -1 instead of turning off the 
warning.

	Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists