Fix issues reported by static analysis tool

Following are the issues reported by the clang static
analysis tool in the CI, this commit is an attempt to
fix those.
1. warning: Value stored to 'rc' during its initialization
   is never read [deadcode.DeadStores]
   auto rc = getHostState();
2. warning: Branch condition evaluates to a garbage
   value [core.uninitialized.Branch]
   if (!pdr)
3. warning: Value stored to 'type' during its initialization
   is never read [deadcode.DeadStores]
   uint8_t type = requestMsg[1];
4. warning: Value stored to 'sum' during its initialization
   is never read [deadcode.DeadStores]
   auto sum = crc32(fruData.data(), recordTableSize + pads);
5. warning: Value stored to 'responsePtr' during its initialization
   is never read [deadcode.DeadStores]
   auto responsePtr = reinterpret_cast<pldm_msg*>(response.data());

Signed-off-by: Manojkiran Eda <manojkiran.eda@gmail.com>
Change-Id: I0673403a36c90025afd0f2b1bca1d7f3ea052033
diff --git a/libpldmresponder/platform.cpp b/libpldmresponder/platform.cpp
index 9cdc6fd..0ad5fb6 100644
--- a/libpldmresponder/platform.cpp
+++ b/libpldmresponder/platform.cpp
@@ -185,7 +185,6 @@
     }
 
     Response response(sizeof(pldm_msg_hdr) + PLDM_GET_PDR_MIN_RESP_BYTES, 0);
-    auto responsePtr = reinterpret_cast<pldm_msg*>(response.data());
 
     if (payloadLength != PLDM_GET_PDR_REQ_BYTES)
     {
@@ -230,7 +229,7 @@
         response.resize(sizeof(pldm_msg_hdr) + PLDM_GET_PDR_MIN_RESP_BYTES +
                             respSizeBytes,
                         0);
-        responsePtr = reinterpret_cast<pldm_msg*>(response.data());
+        auto responsePtr = reinterpret_cast<pldm_msg*>(response.data());
         rc = encode_get_pdr_resp(
             request->hdr.instance_id, PLDM_SUCCESS, e.handle.nextRecordHandle,
             0, PLDM_START_AND_END, respSizeBytes, recordData, 0, responsePtr);