Commit e7d9317b by Derek Mauro Committed by Copybara-Service

Fix an unreachable code warning on some platforms

#1558

PiperOrigin-RevId: 577874842
Change-Id: I1d56f3f4b445f6c4a9df2fe06fec542cb00e0e92
parent f4106724
......@@ -1245,9 +1245,16 @@ TEST_F(FormatConvertTest, ExpectedFailures) {
// Sanity check to make sure that we are testing what we think we're testing on
// e.g. the x86_64+glibc platform.
TEST_F(FormatConvertTest, GlibcHasCorrectTraits) {
#if !defined(__GLIBC__) || !defined(__x86_64__)
return;
#if defined(__GLIBC__) && defined(__x86_64__)
constexpr bool kIsSupportedGlibc = true;
#else
constexpr bool kIsSupportedGlibc = false;
#endif
if (!kIsSupportedGlibc) {
GTEST_SKIP() << "Test does not support this platform";
}
const NativePrintfTraits &native_traits = VerifyNativeImplementation();
// If one of the following tests break then it is either because the above PP
// macro guards failed to exclude a new platform (likely) or because something
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment