Skip to content

gtest.cc: declare fail_if_no_test_linked flag#4898

Open
ngie-eign wants to merge 1 commit intogoogle:mainfrom
ngie-eign:issue-4897
Open

gtest.cc: declare fail_if_no_test_linked flag#4898
ngie-eign wants to merge 1 commit intogoogle:mainfrom
ngie-eign:issue-4897

Conversation

@ngie-eign
Copy link
Contributor

@ngie-eign ngie-eign commented Jan 4, 2026

Clang's -Wmissing-variable-declarations flag flags this as an issue since the flag is only used in gtest.cc. Declare the flag beforehand in gtest.cc to tell the compiler that the variable scope is limited to gtest.cc.

Closes: #4897

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`.

Signed-off-by: Enji Cooper <yaneurabeya@gmail.com>
freebsd-git pushed a commit to freebsd/freebsd-src that referenced this pull request Jan 29, 2026
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:	4633322
Ref:		google/googletest#4898
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] 1.17.0 fails to compile with clang -Werror -Wmissing-variable-declarations

1 participant