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:   Sat, 26 Aug 2023 00:17:33 +0200
From:   Wolfram Sang <wsa@...nel.org>
To:     Justin Stitt <justinstitt@...gle.com>
Cc:     Andi Shyti <andi.shyti@...nel.org>,
        Nathan Chancellor <nathan@...nel.org>,
        Nick Desaulniers <ndesaulniers@...gle.com>,
        Tom Rix <trix@...hat.com>, linux-i2c@...r.kernel.org,
        linux-kernel@...r.kernel.org, llvm@...ts.linux.dev
Subject: Re: [PATCH] i2c: pxa: fix clang -Wvoid-pointer-to-enum-cast warning


> Note: I think something like this may be more readable:
> | 	*i2c_types = (enum pxa_i2c_types)(uintptr_t)of_id->data;
> 
> Thoughts on this approach against the one present in this patch?

On the one hand, I think this is more explicit and, thus, more readable.
On the other hand, we still have the loss of precision, between the
first and the second cast. Which gives it a bit of a "let's hide it
somewhat so the compiler will be happy" feeling?


Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ