RFR: 8345273: Fix -Wzero-as-null-pointer-constant warnings in s390 code
Amit Kumar
amitkumar at openjdk.org
Mon Dec 2 04:42:42 UTC 2024
On Sun, 1 Dec 2024 16:23:35 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:
> Please review this change to remove -Wzero-as-null-pointer-constant warnings
> in s390 code.
>
> Most places involve just changing literal 0 to nullptr.
>
> Removed a dead return after ShouldNotReachHere() that is no longer needed.
>
> Testing:
> GHA sanity test build, with and without -Wzero-as-null-pointer-constant enabled.
> I don't have the capability to run tests for this platform, so hoping someone
> from the aix-ppc maintainers can do more testing.
hi @kimbarrett,
I tried to build it on s390x with these changes:
diff --git a/make/autoconf/flags-cflags.m4 b/make/autoconf/flags-cflags.m4
index 57654514eb6..ce3077e7d38 100644
--- a/make/autoconf/flags-cflags.m4
+++ b/make/autoconf/flags-cflags.m4
@@ -448,7 +448,7 @@ AC_DEFUN([FLAGS_SETUP_CFLAGS],
CC="$CC_OLD"
CXX="$CXX_OLD"
CFLAGS="$CFLAGS_OLD"
- CXXFLAGS="$CXXFLAGS_OLD"
+ CXXFLAGS="$CXXFLAGS_OLD -Wzero-as-null-pointer-constant"
])
is that correct way to test it ?
I got couple of build warnings, good thing is that none of them are in s390x code. I am attaching build.log file.
[build.log](https://github.com/user-attachments/files/17972560/build.log)
-------------
PR Comment: https://git.openjdk.org/jdk/pull/22469#issuecomment-2510564427
More information about the hotspot-dev
mailing list