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] [day] [month] [year] [list]
Date:   Thu, 24 Mar 2022 19:49:36 +0100
From:   David Sterba <dsterba@...e.cz>
To:     Nathan Chancellor <nathan@...nel.org>
Cc:     Chris Mason <clm@...com>, Josef Bacik <josef@...icpanda.com>,
        David Sterba <dsterba@...e.com>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        linux-btrfs@...r.kernel.org, linux-kernel@...r.kernel.org,
        llvm@...ts.linux.dev, patches@...ts.linux.dev,
        stable@...r.kernel.org
Subject: Re: [PATCH] btrfs: Remove unused variable in
 btrfs_{start,write}_dirty_block_groups()

On Thu, Mar 24, 2022 at 08:36:45AM -0700, Nathan Chancellor wrote:
> Clang's version of -Wunused-but-set-variable recently gained support for
> unary operations, which reveals two unused variables:
> 
>   fs/btrfs/block-group.c:2949:6: error: variable 'num_started' set but not used [-Werror,-Wunused-but-set-variable]
>           int num_started = 0;
>               ^
>   fs/btrfs/block-group.c:3116:6: error: variable 'num_started' set but not used [-Werror,-Wunused-but-set-variable]
>           int num_started = 0;
>               ^
>   2 errors generated.
> 
> These variables appear to be unused from their introduction, so just
> remove them to silence the warnings.
> 
> Cc: stable@...r.kernel.org
> Fixes: c9dc4c657850 ("Btrfs: two stage dirty block group writeout")
> Fixes: 1bbc621ef284 ("Btrfs: allow block group cache writeout outside critical section in commit")
> Link: https://github.com/ClangBuiltLinux/linux/issues/1614
> Signed-off-by: Nathan Chancellor <nathan@...nel.org>

Added to misc-next, thanks.

> I am requesting a stable backport because this is visible with
> allmodconfig, which enables CONFIG_WERROR, breaking the build.

Yeah warning fixes are accepted in stable trees and we care about
warning-free builds. My gcc 11.1 does not produce any warning with
-Wunused-but-set-variable and we have extended the set of warnings in
the directory fs/btrfs/ that also includes that one.

> To quote Linus:
> 
> "EVERYBODY should have CONFIG_WERROR=y on at least x86-64 and other
> serious architectures, unless you have some completely random
> experimental (and broken) compiler."

I have CONFIG_WERROR disabled, for own development it's quite annoying
when build fails outside of the code I care about, while I apply visual
checks of warning-free builds.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ