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]
Message-ID: <YL9UZzjqz8gHLbfo@hirez.programming.kicks-ass.net>
Date:   Tue, 8 Jun 2021 13:28:39 +0200
From:   Peter Zijlstra <peterz@...radead.org>
To:     Ricardo Ribalda <ribalda@...omium.org>
Cc:     Linux Kernel Mailing List <linux-kernel@...r.kernel.org>,
        linux-perf-users@...r.kernel.org, Ingo Molnar <mingo@...hat.com>,
        Arnaldo Carvalho de Melo <acme@...nel.org>
Subject: Re: [PATCH] tools/perf: Do not set a variable unless it will be used

On Fri, Jun 04, 2021 at 09:24:23PM +0200, Ricardo Ribalda wrote:
> Hi Peter
> 
> On Fri, 4 Jun 2021 at 11:36, Peter Zijlstra <peterz@...radead.org> wrote:
> >
> > 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]
                                                                         clue here: ^^^^^^^^^^^^^

> > >         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.
> 
> My knowledge of llvm codebase is close to NULL, so it is much easier
> for me to "fix" the code.

That's what -Wno-unused-but-set-variable is for, which is trivial to add
to the Makefile.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ