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/pldmd/pldmd.cpp b/pldmd/pldmd.cpp
index d1889ee..53dbe0b 100644
--- a/pldmd/pldmd.cpp
+++ b/pldmd/pldmd.cpp
@@ -65,8 +65,8 @@
     processRxMsg(const std::vector<uint8_t>& requestMsg, Invoker& invoker,
                  requester::Handler<requester::Request>& handler)
 {
+    using type = uint8_t;
     uint8_t eid = requestMsg[0];
-    uint8_t type = requestMsg[1];
     pldm_header_info hdrFields{};
     auto hdr = reinterpret_cast<const pldm_msg_hdr*>(
         requestMsg.data() + sizeof(eid) + sizeof(type));