8338154: Fix -Wzero-as-null-pointer-constant warnings in gtest framework

Reviewed-by: ihse, dholmes, jwaters
This commit is contained in:
Kim Barrett 2024-08-13 05:46:38 +00:00
parent e70c9bccaa
commit d77e6fe45c
2 changed files with 3 additions and 2 deletions

View File

@ -57,7 +57,8 @@ $(eval $(call SetupJdkLibrary, BUILD_GTEST_LIBGTEST, \
$(GTEST_FRAMEWORK_SRC)/googletest/src \
$(GTEST_FRAMEWORK_SRC)/googlemock/src, \
INCLUDE_FILES := gtest-all.cc gmock-all.cc, \
DISABLED_WARNINGS_gcc := undef unused-result format-nonliteral maybe-uninitialized, \
DISABLED_WARNINGS_gcc := undef unused-result format-nonliteral \
maybe-uninitialized zero-as-null-pointer-constant, \
DISABLED_WARNINGS_clang := undef unused-result format-nonliteral, \
DEFAULT_CFLAGS := false, \
CFLAGS := $(JVM_CFLAGS) \

View File

@ -336,7 +336,7 @@ static void run_in_new_thread(const args_t* args) {
extern "C" void* thread_wrapper(void* p) {
const args_t* const p_args = (const args_t*) p;
runUnitTestsInner(p_args->argc, p_args->argv);
return 0;
return nullptr;
}
static void run_in_new_thread(const args_t* args) {