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/softoff/softoff.cpp b/softoff/softoff.cpp
index 9819931..ffc81c8 100644
--- a/softoff/softoff.cpp
+++ b/softoff/softoff.cpp
@@ -33,13 +33,13 @@
 SoftPowerOff::SoftPowerOff(sdbusplus::bus::bus& bus, sd_event* event) :
     bus(bus), timer(event)
 {
-    auto rc = getHostState();
+    getHostState();
     if (hasError || completed)
     {
         return;
     }
 
-    rc = getEffecterID();
+    auto rc = getEffecterID();
     if (completed)
     {
         std::cerr
@@ -254,12 +254,11 @@
         for (auto& rep : Response)
         {
             pdr = reinterpret_cast<pldm_state_sensor_pdr*>(rep.data());
-        }
-
-        if (!pdr)
-        {
-            std::cerr << "Failed to get state sensor PDR.\n";
-            return PLDM_ERROR;
+            if (!pdr)
+            {
+                std::cerr << "Failed to get state sensor PDR.\n";
+                return PLDM_ERROR;
+            }
         }
 
         sensorID = pdr->sensor_id;