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: <alpine.DEB.2.21.2310041557310.61599@angie.orcam.me.uk>
Date:   Wed, 4 Oct 2023 16:02:01 +0100 (BST)
From:   "Maciej W. Rozycki" <macro@...am.me.uk>
To:     Su Hui <suhui@...china.com>
cc:     Dan Carpenter <dan.carpenter@...aro.org>,
        Greg Kroah-Hartman <gregkh@...uxfoundation.org>,
        rafael@...nel.org, linux-kernel@...r.kernel.org,
        kernel-janitors@...r.kernel.org
Subject: Re: [PATCH] driver base: slience unused warning

On Fri, 8 Sep 2023, Su Hui wrote:

> This variable is been used but never be read, so gcc and W=1 give such
> warning.
> 
> drivers/base/module.c:36:6: error:
> variable ‘no_warn’ set but not used [-Werror=unused-but-set-variable]
> 
> I wanted to use "__maybe_unused" to avoid  this warning.
> 
> However it seems like a wrong using of "__maybe_unused" as Greg KH said:
> 
> "But no_warn is being used in this file, it's being set but not read
> which is ok.  That's a real use, so this change really isn't correct,
> sorry."

 The warning itself is a real issue to be sorted though.  Is this a use 
case for `#pragma GCC diagnostic'?

  Maciej

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ