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]
Date:   Thu, 4 Oct 2018 21:18:54 +0200
From:   Lars Ellenberg <lars.ellenberg@...bit.com>
To:     Nathan Chancellor <natechancellor@...il.com>
Cc:     Philipp Reisner <philipp.reisner@...bit.com>,
        Jens Axboe <axboe@...nel.dk>, drbd-dev@...ts.linbit.com,
        linux-block@...r.kernel.org, linux-kernel@...r.kernel.org,
        Arnd Bergmann <arnd@...db.de>
Subject: Re: [PATCH RESEND] drbd: avoid clang warning about pointless switch
 statement

On Tue, Oct 02, 2018 at 10:14:48AM -0700, Nathan Chancellor wrote:
> From: Arnd Bergmann <arnd@...db.de>
> 
> The drbd code causes warnings that we cannot easily disable when building with clang:
> 
> In file included from drivers/block/drbd/drbd_debugfs.c:10:
> In file included from drivers/block/drbd/drbd_int.h:48:
> In file included from include/linux/drbd_genl_api.h:53:
> In file included from include/linux/genl_magic_struct.h:237:
> include/linux/drbd_genl.h:300:1: warning: no case matching constant switch condition '0'
> 
> There is nothing wrong with the code, and adding 'default:' labels
> in the right place is enough to let clang shut up about the warning.

Actually, I think I'd prefer a "case 0:" instead of the "default:",
because that would assert that we don't use a 0 for op or field numbers.

As at least some people seem to care, I suggest we bundle up
this and the other clang warning you just resent the patch for
with whatever else we may come up with for the next merge window
and send a pull request to Jens then.
In case we forget, please send a friendly reminder.

Thanks,

    Lars

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ