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: <Y1++fLJXkeZgtXR2@infradead.org>
Date:   Mon, 31 Oct 2022 05:24:28 -0700
From:   Christoph Hellwig <hch@...radead.org>
To:     "Jiri Slaby (SUSE)" <jirislaby@...nel.org>
Cc:     tj@...nel.org, linux-kernel@...r.kernel.org,
        Martin Liska <mliska@...e.cz>,
        Josef Bacik <josef@...icpanda.com>,
        Jens Axboe <axboe@...nel.dk>, cgroups@...r.kernel.org,
        linux-block@...r.kernel.org
Subject: Re: [PATCH] block/blk-iocost (gcc13): cast enum members to int in
 prints

On Mon, Oct 31, 2022 at 12:45:20PM +0100, Jiri Slaby (SUSE) wrote:
> Cast the enum members to int when printing them.
> 
> Alternatively, we can cast them to ulong (to silence gcc < 12) and use %lu.
> Alternatively, we can move VTIME_PER_SEC away from the enum.

Yes, either split the enum or just use a define.  But casts are a big
code smell and should be avoided if there is a reasonable alternative.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ