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/fru.cpp b/libpldmresponder/fru.cpp
index 3ec5d92..f0c2214 100644
--- a/libpldmresponder/fru.cpp
+++ b/libpldmresponder/fru.cpp
@@ -257,6 +257,8 @@
                                   uint16_t recordSetIdentifer,
                                   uint8_t recordType, uint8_t fieldType)
 {
+    using sum = uint32_t;
+
     // FRU table is built lazily, build if not done.
     buildFRUTable();
 
@@ -278,7 +280,7 @@
     }
 
     auto pads = utils::getNumPadBytes(recordTableSize);
-    auto sum = crc32(fruData.data(), recordTableSize + pads);
+    crc32(fruData.data(), recordTableSize + pads);
 
     auto iter = fruData.begin() + recordTableSize + pads;
     std::copy_n(reinterpret_cast<const uint8_t*>(&checksum), sizeof(checksum),