git: 3926ae98adfe - main - gtest.cc: declare fail_if_no_test_linked flag

From: Enji Cooper <ngie_at_FreeBSD.org>
Date: Thu, 29 Jan 2026 01:25:54 UTC
The branch main has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=3926ae98adfe4b2f1dd957cab353ba7ca11ce709

commit 3926ae98adfe4b2f1dd957cab353ba7ca11ce709
Author:     Enji Cooper <ngie@FreeBSD.org>
AuthorDate: 2026-01-29 01:22:42 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-01-29 01:25:26 +0000

    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
---
 contrib/googletest/googletest/src/gtest.cc | 1 +
 1 file changed, 1 insertion(+)

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),