@@ -40,8 +40,9 @@ static void expectStaLibertyCoreState(Sta *sta, LibertyLibrary *lib)
4040 EXPECT_NE (sta->cmdSdc (), nullptr );
4141 EXPECT_NE (sta->report (), nullptr );
4242 EXPECT_FALSE (sta->scenes ().empty ());
43- if (!sta->scenes ().empty ())
43+ if (!sta->scenes ().empty ()) {
4444 EXPECT_GE (sta->scenes ().size (), 1 );
45+ }
4546 EXPECT_NE (sta->cmdScene (), nullptr );
4647 EXPECT_NE (lib, nullptr );
4748}
@@ -860,6 +861,7 @@ TEST_F(StaLibertyTest, CellFootprint2) {
860861 LibertyCell *buf = lib_->findLibertyCell (" BUF_X1" );
861862 ASSERT_NE (buf, nullptr );
862863 const std::string &fp = buf->footprint ();
864+ (void )fp;
863865 // fp may be empty for simple arcs
864866}
865867
@@ -1433,6 +1435,7 @@ TEST(R6_FuncExprTest, PortExprCheckSizeOne) {
14331435 // Port with size 1 should return true for checkSize(1)
14341436 // (depends on port->size())
14351437 bool result = port_expr->checkSize (1 );
1438+ (void )result;
14361439 // Just exercise the code path
14371440 // result tested implicitly (bool accessor exercised)
14381441 delete port_expr;
@@ -1462,7 +1465,7 @@ TEST(R6_FuncExprTest, HasPortMatching) {
14621465 FuncExpr *expr_a = FuncExpr::makePort (port_a);
14631466 EXPECT_TRUE (expr_a->hasPort (port_a));
14641467 EXPECT_FALSE (expr_a->hasPort (port_b));
1465- expr_a; // deleteSubexprs removed
1468+ ( void ) expr_a; // deleteSubexprs removed
14661469}
14671470
14681471TEST (R6_FuncExprTest, LessPortExprs) {
@@ -1478,8 +1481,8 @@ TEST(R6_FuncExprTest, LessPortExprs) {
14781481 bool r1 = FuncExpr::less (expr_a, expr_b);
14791482 bool r2 = FuncExpr::less (expr_b, expr_a);
14801483 EXPECT_NE (r1, r2);
1481- expr_a; // deleteSubexprs removed
1482- expr_b; // deleteSubexprs removed
1484+ ( void ) expr_a; // deleteSubexprs removed
1485+ ( void ) expr_b; // deleteSubexprs removed
14831486}
14841487
14851488TEST (R6_FuncExprTest, EquivPortExprs) {
@@ -1490,8 +1493,8 @@ TEST(R6_FuncExprTest, EquivPortExprs) {
14901493 FuncExpr *expr1 = FuncExpr::makePort (port_a);
14911494 FuncExpr *expr2 = FuncExpr::makePort (port_a);
14921495 EXPECT_TRUE (FuncExpr::equiv (expr1, expr2));
1493- expr1; // deleteSubexprs removed
1494- expr2; // deleteSubexprs removed
1496+ ( void ) expr1; // deleteSubexprs removed
1497+ ( void ) expr2; // deleteSubexprs removed
14951498}
14961499
14971500// //////////////////////////////////////////////////////////////
@@ -2255,6 +2258,7 @@ TEST_F(StaLibertyTest, CellFootprint3) {
22552258 LibertyCell *buf = lib_->findLibertyCell (" BUF_X1" );
22562259 ASSERT_NE (buf, nullptr );
22572260 const std::string &fp = buf->footprint ();
2261+ (void )fp;
22582262 // May be empty for simple arcs
22592263}
22602264
@@ -2271,6 +2275,7 @@ TEST_F(StaLibertyTest, CellUserFunctionClass2) {
22712275 LibertyCell *buf = lib_->findLibertyCell (" BUF_X1" );
22722276 ASSERT_NE (buf, nullptr );
22732277 const std::string &ufc = buf->userFunctionClass ();
2278+ (void )ufc;
22742279 // ufc may be empty for simple arcs
22752280}
22762281
@@ -2690,7 +2695,7 @@ TEST_F(StaLibertyTest, FuncExprMakeNot) {
26902695 EXPECT_EQ (not_expr->left (), port_expr);
26912696 std::string s = not_expr->to_string ();
26922697 EXPECT_FALSE (s.empty ());
2693- not_expr; // deleteSubexprs removed
2698+ ( void ) not_expr; // deleteSubexprs removed
26942699}
26952700
26962701// FuncExpr::makeAnd
@@ -2707,7 +2712,7 @@ TEST_F(StaLibertyTest, FuncExprMakeAnd) {
27072712 EXPECT_EQ (and_expr->op (), FuncExpr::Op::and_);
27082713 std::string s = and_expr->to_string ();
27092714 EXPECT_FALSE (s.empty ());
2710- and_expr; // deleteSubexprs removed
2715+ ( void ) and_expr; // deleteSubexprs removed
27112716}
27122717
27132718// FuncExpr::makeOr
@@ -2722,7 +2727,7 @@ TEST_F(StaLibertyTest, FuncExprMakeOr) {
27222727 FuncExpr *right = FuncExpr::makePort (a2);
27232728 FuncExpr *or_expr = FuncExpr::makeOr (left, right);
27242729 EXPECT_EQ (or_expr->op (), FuncExpr::Op::or_);
2725- or_expr; // deleteSubexprs removed
2730+ ( void ) or_expr; // deleteSubexprs removed
27262731}
27272732
27282733// FuncExpr::makeXor
@@ -2735,7 +2740,7 @@ TEST_F(StaLibertyTest, FuncExprMakeXor) {
27352740 FuncExpr *right = FuncExpr::makePort (a);
27362741 FuncExpr *xor_expr = FuncExpr::makeXor (left, right);
27372742 EXPECT_EQ (xor_expr->op (), FuncExpr::Op::xor_);
2738- xor_expr; // deleteSubexprs removed
2743+ ( void ) xor_expr; // deleteSubexprs removed
27392744}
27402745
27412746// FuncExpr::makeZero and makeOne
@@ -2772,8 +2777,9 @@ TEST_F(StaLibertyTest, FuncExprHasPort) {
27722777 ASSERT_NE (a, nullptr );
27732778 FuncExpr *expr = FuncExpr::makePort (a);
27742779 EXPECT_TRUE (expr->hasPort (a));
2775- if (zn)
2780+ if (zn) {
27762781 EXPECT_FALSE (expr->hasPort (zn));
2782+ }
27772783 delete expr;
27782784}
27792785
@@ -2786,7 +2792,7 @@ TEST_F(StaLibertyTest, FuncExprPortTimingSense) {
27862792 FuncExpr *not_expr = FuncExpr::makeNot (FuncExpr::makePort (a));
27872793 TimingSense sense = not_expr->portTimingSense (a);
27882794 EXPECT_EQ (sense, TimingSense::negative_unate);
2789- not_expr; // deleteSubexprs removed
2795+ ( void ) not_expr; // deleteSubexprs removed
27902796}
27912797
27922798// FuncExpr::copy
@@ -2905,8 +2911,9 @@ TEST_F(StaLibertyTest, PortIsClock2) {
29052911 ASSERT_NE (ck, nullptr );
29062912 EXPECT_TRUE (ck->isClock ());
29072913 LibertyPort *d = dff->findLibertyPort (" D" );
2908- if (d)
2914+ if (d) {
29092915 EXPECT_FALSE (d->isClock ());
2916+ }
29102917}
29112918
29122919// LibertyPort::setIsClock
@@ -3047,6 +3054,7 @@ TEST_F(StaLibertyTest, TimingArcSetIsCondDefault) {
30473054 ASSERT_GT (arcsets.size (), 0u );
30483055 // Default should be false or true depending on library
30493056 bool cd = arcsets[0 ]->isCondDefault ();
3057+ (void )cd;
30503058 // cd value depends on cell type
30513059}
30523060
@@ -3326,6 +3334,7 @@ TEST_F(StaLibertyTest, PortCapacitanceIsOneValue2) {
33263334 LibertyPort *a = buf->findLibertyPort (" A" );
33273335 ASSERT_NE (a, nullptr );
33283336 bool one_val = a->capacitanceIsOneValue ();
3337+ (void )one_val;
33293338 // one_val value depends on cell type
33303339}
33313340
@@ -3384,6 +3393,9 @@ TEST_F(StaLibertyTest, ScaleFactorTypeRiseFallSuffix) {
33843393 bool rfs = scaleFactorTypeRiseFallSuffix (ScaleFactorType::cell);
33853394 bool rfp = scaleFactorTypeRiseFallPrefix (ScaleFactorType::cell);
33863395 bool lhs = scaleFactorTypeLowHighSuffix (ScaleFactorType::cell);
3396+ (void )rfs;
3397+ (void )rfp;
3398+ (void )lhs;
33873399 // rfs tested implicitly (bool accessor exercised)
33883400 // rfp tested implicitly (bool accessor exercised)
33893401 // lhs tested implicitly (bool accessor exercised)
0 commit comments