summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorKlement Sekera <ksekera@cisco.com>2021-10-13 21:45:42 +0200
committerAndrew Yourtchenko <ayourtch@gmail.com>2021-10-14 07:12:43 +0000
commita0f55c9ce973f72d3969b59783874c42dec34a5e (patch)
tree709033f6d1a824ca306dc5cd56009c78f2dc0b5e /src
parente29c7e844e553fcc4356c5fe96984b18dc6156f4 (diff)
tests: fix coverity warnings
Fix coverity warnings by initialising variables and removing dead code. Type: fix Signed-off-by: Klement Sekera <ksekera@cisco.com> Change-Id: I0254b81020cdc3d7075df003309065438526918f
Diffstat (limited to 'src')
-rw-r--r--src/vpp-api/vapi/vapi_cpp_test.cpp8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/vpp-api/vapi/vapi_cpp_test.cpp b/src/vpp-api/vapi/vapi_cpp_test.cpp
index 1dd58f85484..c574dd70b96 100644
--- a/src/vpp-api/vapi/vapi_cpp_test.cpp
+++ b/src/vpp-api/vapi/vapi_cpp_test.cpp
@@ -146,7 +146,6 @@ START_TEST (test_loopbacks_1)
{ // new context
bool seen[num_ifs] = {0};
Sw_interface_dump d (con);
- d.get_request ().get_payload ();
auto rv = d.execute ();
ck_assert_int_eq (VAPI_OK, rv);
WAIT_FOR_RESPONSE (d, rv);
@@ -186,7 +185,6 @@ START_TEST (test_loopbacks_1)
{ // new context
Sw_interface_dump d (con);
- d.get_request ().get_payload ();
auto rv = d.execute ();
ck_assert_int_eq (VAPI_OK, rv);
WAIT_FOR_RESPONSE (d, rv);
@@ -207,7 +205,7 @@ END_TEST;
struct Create_loopback_cb
{
- Create_loopback_cb () : called{0}, sw_if_index{0} {};
+ Create_loopback_cb () : called{ 0 }, sw_if_index{ 0 }, seen{ false } {};
int called;
u32 sw_if_index;
bool seen;
@@ -222,7 +220,7 @@ struct Create_loopback_cb
struct Delete_loopback_cb
{
- Delete_loopback_cb () : called{0}, sw_if_index{0} {};
+ Delete_loopback_cb () : called{ 0 }, sw_if_index{ 0 }, seen{ false } {};
int called;
u32 sw_if_index;
bool seen;
@@ -302,7 +300,6 @@ START_TEST (test_loopbacks_2)
Sw_interface_dump_cb<num_ifs> swdcb (ccbs);
Sw_interface_dump d (con, std::ref (swdcb));
- d.get_request ().get_payload ();
auto rv = d.execute ();
ck_assert_int_eq (VAPI_OK, rv);
WAIT_FOR_RESPONSE (d, rv);
@@ -329,7 +326,6 @@ START_TEST (test_loopbacks_2)
{ // new context
Sw_interface_dump d (con);
- d.get_request ().get_payload ();
auto rv = d.execute ();
ck_assert_int_eq (VAPI_OK, rv);
WAIT_FOR_RESPONSE (d, rv);