aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEnji Cooper <ngie@FreeBSD.org>2026-01-29 01:22:42 +0000
committerEnji Cooper <ngie@FreeBSD.org>2026-01-29 01:25:26 +0000
commit3926ae98adfe4b2f1dd957cab353ba7ca11ce709 (patch)
treeec9c560818082439f0039fd455775f1a46f7dc41
parent46333229c6a0187ebf231805682ee0bceed704d1 (diff)
gtest.cc: declare fail_if_no_test_linked flag
Clang's -Wmissing-variable-declarations flags this as an issue since the flag is only used in `gtest.cc`. Declare the flag beforehand to ensure that the variable scope is properly limited to `gtest.cc`. MFC after: 1 week MFC with: 46333229c6a0187ebf231805682ee0bceed704d1 Ref: https://github.com/google/googletest/pull/4898
-rw-r--r--contrib/googletest/googletest/src/gtest.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/contrib/googletest/googletest/src/gtest.cc b/contrib/googletest/googletest/src/gtest.cc
index 09af15179f1f..0e32774bc6d1 100644
--- a/contrib/googletest/googletest/src/gtest.cc
+++ b/contrib/googletest/googletest/src/gtest.cc
@@ -263,6 +263,7 @@ GTEST_DEFINE_bool_(
testing::GetDefaultFailFast()),
"True if and only if a test failure should stop further test execution.");
+GTEST_DECLARE_bool_(fail_if_no_test_linked);
GTEST_DEFINE_bool_(
fail_if_no_test_linked,
testing::internal::BoolFromGTestEnv("fail_if_no_test_linked", false),