Thread (6 messages) 6 messages, 3 authors, 2021-06-09

Re: [PATCH] tools/perf: Do not set a variable unless it will be used

From: Peter Zijlstra <peterz@infradead.org>
Date: 2021-06-04 09:36:23
Also in: lkml

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.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help