Skip to content

Commit d77e6fe

Browse files
author
Kim Barrett
committed
8338154: Fix -Wzero-as-null-pointer-constant warnings in gtest framework
Reviewed-by: ihse, dholmes, jwaters
1 parent e70c9bc commit d77e6fe

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

make/hotspot/lib/CompileGtest.gmk

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,8 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBGTEST, \
5757
$(GTEST_FRAMEWORK_SRC)/googletest/src \
5858
$(GTEST_FRAMEWORK_SRC)/googlemock/src, \
5959
INCLUDE_FILES := gtest-all.cc gmock-all.cc, \
60-
DISABLED_WARNINGS_gcc := undef unused-result format-nonliteral maybe-uninitialized, \
60+
DISABLED_WARNINGS_gcc := undef unused-result format-nonliteral \
61+
maybe-uninitialized zero-as-null-pointer-constant, \
6162
DISABLED_WARNINGS_clang := undef unused-result format-nonliteral, \
6263
DEFAULT_CFLAGS := false, \
6364
CFLAGS := $(JVM_CFLAGS) \

test/hotspot/gtest/gtestMain.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -336,7 +336,7 @@ static void run_in_new_thread(const args_t* args) {
336336
extern "C" void* thread_wrapper(void* p) {
337337
const args_t* const p_args = (const args_t*) p;
338338
runUnitTestsInner(p_args->argc, p_args->argv);
339-
return 0;
339+
return nullptr;
340340
}
341341

342342
static void run_in_new_thread(const args_t* args) {

0 commit comments

Comments
 (0)