From dc5135d735ab9ff3c35c9b0135e9c83410d8210f Mon Sep 17 00:00:00 2001 From: DavidZagury <32644413+DavidZagury@users.noreply.github.com> Date: Mon, 14 Aug 2023 03:56:18 +0300 Subject: [PATCH] Fix minor issue found during static code scan (#740) Fix issue of using uninitialized value on unit tests. --- tests/stringutility_ut.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/stringutility_ut.cpp b/tests/stringutility_ut.cpp index 0536958b0..c72ecdc63 100644 --- a/tests/stringutility_ut.cpp +++ b/tests/stringutility_ut.cpp @@ -8,7 +8,7 @@ TEST(STRINGUTILITY, cast_int) { - int i; + int i = 0; EXPECT_NO_THROW(swss::lexical_convert("123", i)); EXPECT_EQ(i, 123); @@ -39,7 +39,7 @@ TEST(STRINGUTILITY, cast_alpha_bool) TEST(STRINGUTILITY, cast_mix) { - int i; + int i = 0; swss::AlphaBoolean b; std::string s;