Skip to content

Commit 84ac413

Browse files
committed
[C] Suppress maybe-uninitialized warnings.
1 parent ea35e4e commit 84ac413

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

sbe-tool/src/test/c/BoundsCheckTest.cpp

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -268,12 +268,26 @@ class BoundsCheckTest : public testing::Test
268268
{
269269
CGT(booleanType) out;
270270
EXPECT_TRUE(CGT(car_available)(&m_carDecoder, &out));
271+
#if defined(__GNUG__) && !defined(__clang__)
272+
#pragma GCC diagnostic push
273+
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
274+
#endif
271275
EXPECT_EQ(out, AVAILABLE);
276+
#if defined(__GNUG__) && !defined(__clang__)
277+
#pragma GCC diagnostic pop
278+
#endif
272279
}
273280
{
274281
CGT(model) out;
275282
EXPECT_TRUE(CGT(car_code)(&m_carDecoder, &out));
283+
#if defined(__GNUG__) && !defined(__clang__)
284+
#pragma GCC diagnostic push
285+
#pragma GCC diagnostic ignored "-Wmaybe-uninitialized"
286+
#endif
276287
EXPECT_EQ(out, CODE);
288+
#if defined(__GNUG__) && !defined(__clang__)
289+
#pragma GCC diagnostic pop
290+
#endif
277291
}
278292

279293
EXPECT_EQ(CGT(car_someNumbers_length)(), 5u);

0 commit comments

Comments
 (0)