From: Peter Zijlstra <peterz@infradead.org>
To: Ricardo Ribalda <ribalda@chromium.org>
Cc: linux-kernel@vger.kernel.org, linux-perf-users@vger.kernel.org,
Ingo Molnar <mingo@redhat.com>,
Arnaldo Carvalho de Melo <acme@kernel.org>
Subject: Re: [PATCH] tools/perf: Do not set a variable unless it will be used
Date: Fri, 4 Jun 2021 11:36:15 +0200 [thread overview]
Message-ID: <YLn0D+1R2QHZYRVV@hirez.programming.kicks-ass.net> (raw)
In-Reply-To: <20210604092638.985694-1-ribalda@chromium.org>
On Fri, Jun 04, 2021 at 11:26:38AM +0200, Ricardo Ribalda wrote:
> clang-13 triggers the following warning:
>
> bench/inject-buildid.c:351:6: error: variable 'len' set but not used [-Werror,-Wunused-but-set-variable]
> u64 len = 0;
>
> This patch sets the value to len only if it will be used afterwards.
My vote would be to kill that warning, what absolute shite.
next prev parent reply other threads:[~2021-06-04 9:36 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-06-04 9:26 Ricardo Ribalda
2021-06-04 9:36 ` Peter Zijlstra [this message]
2021-06-04 19:24 ` Ricardo Ribalda
2021-06-08 11:28 ` Peter Zijlstra
2021-06-09 14:15 ` Ricardo Ribalda
2021-06-08 11:12 ` David Laight
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=YLn0D+1R2QHZYRVV@hirez.programming.kicks-ass.net \
--to=peterz@infradead.org \
--cc=acme@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-perf-users@vger.kernel.org \
--cc=mingo@redhat.com \
--cc=ribalda@chromium.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®