RFR: 8263718: unused-result warning happens at os_linux.cpp
Thomas Stuefe
stuefe at openjdk.java.net
Fri Mar 19 04:47:42 UTC 2021
On Fri, 19 Mar 2021 00:14:38 GMT, Yasumasa Suenaga <ysuenaga at openjdk.org> wrote:
> > BTW this is not the first time we have had this issue with gcc making a
> > function deprecated and casting to void not fixing it. Unfortunately I
> > can't remember enough of the previous case's details to actually look it
> > up and see what we resolved to do. :(
>
> I found [JDK-6879689](https://bugs.openjdk.java.net/browse/JDK-6879689), and it fixed unused-return as following:
>
> https://github.com/openjdk/jdk/blob/9b5a9b61899cf649104c0ff70e14549f64a89561/src/hotspot/share/adlc/archDesc.cpp#L1082-L1083
>
> I prefer it rather than `(void)!`.
Does that work in release builds too?
-------------
PR: https://git.openjdk.java.net/jdk/pull/3042
More information about the hotspot-dev
mailing list