clang-error: fix clang-analyzer-deadcode.DeadStores error
This clang error is generated when the value stored to a variable
is never read in the code.
Change-Id: Ib68741b3aaf8856010d0073675abc2fdb3012712
Signed-off-by: Pavithra Barithaya <pavithra.b@ibm.com>
diff --git a/oem/ibm/test/libpldmresponder_fileio_test.cpp b/oem/ibm/test/libpldmresponder_fileio_test.cpp
index 18b7970..d9d68e7 100644
--- a/oem/ibm/test/libpldmresponder_fileio_test.cpp
+++ b/oem/ibm/test/libpldmresponder_fileio_test.cpp
@@ -980,6 +980,7 @@
auto fd = mkstemp(tmplt);
std::vector<uint8_t> in = {100, 10, 56, 78, 34, 56, 79, 235, 111};
rc = write(fd, in.data(), in.size());
+ ASSERT_NE(rc, PLDM_ERROR);
close(fd);
length = in.size() + 1000;
rc = handler.readFile(tmplt, 0, length, response);
diff --git a/oem/ibm/test/libpldmresponder_oem_platform_test.cpp b/oem/ibm/test/libpldmresponder_oem_platform_test.cpp
index 967cc08..55768d5 100644
--- a/oem/ibm/test/libpldmresponder_oem_platform_test.cpp
+++ b/oem/ibm/test/libpldmresponder_oem_platform_test.cpp
@@ -80,12 +80,14 @@
std::vector<get_sensor_state_field> stateField1;
rc = oemPlatformHandler->getOemStateSensorReadingsHandler(
entityID_, entityInstance_, stateSetId_, compSensorCnt_, stateField1);
+ ASSERT_EQ(rc, PLDM_SUCCESS);
ASSERT_EQ(stateField1.size(), 1);
ASSERT_EQ(stateField1[0].event_state, tSideNum);
entityInstance_ = 2;
rc = oemPlatformHandler->getOemStateSensorReadingsHandler(
entityID_, entityInstance_, stateSetId_, compSensorCnt_, stateField1);
+ ASSERT_EQ(rc, PLDM_SUCCESS);
ASSERT_EQ(stateField1[0].event_state, PLDM_SENSOR_UNKNOWN);
entityID_ = 40;