PEL: Fix more cppcheck warnings

This is the second of two commits to fix most of the cppcheck warnings
in the PEL code.  It doesn't fix all of them because some are false
positives and some are just suggestions.

It's broken up into two commits to make them smaller.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: Id9f462386df85fd25d09529d6b410115ff4ccba8
diff --git a/test/openpower-pels/repository_test.cpp b/test/openpower-pels/repository_test.cpp
index 73a24d8..7502dfa 100644
--- a/test/openpower-pels/repository_test.cpp
+++ b/test/openpower-pels/repository_test.cpp
@@ -659,8 +659,8 @@
     // there so we can check they are removed after the prune.
     for (uint32_t i = 1; i < 5; i++)
     {
-        Repository::LogID id{Repository::LogID::Pel{i}};
-        EXPECT_TRUE(repo.getPELAttributes(id));
+        Repository::LogID logID{Repository::LogID::Pel{i}};
+        EXPECT_TRUE(repo.getPELAttributes(logID));
     }
 
     // Prune down to 15%/30%/15%/30% = 90% total
@@ -677,8 +677,8 @@
     // each type, were removed.
     for (uint32_t i = 1; i < 5; i++)
     {
-        Repository::LogID id{Repository::LogID::Pel{i}};
-        EXPECT_FALSE(repo.getPELAttributes(id));
+        Repository::LogID logID{Repository::LogID::Pel{i}};
+        EXPECT_FALSE(repo.getPELAttributes(logID));
 
         // Make sure the corresponding OpenBMC event log ID which is
         // 500 + the PEL ID is in the list.
@@ -710,8 +710,8 @@
     // get pruned below we'll know they were removed.
     for (uint32_t i = 1; i <= 20; i++)
     {
-        Repository::LogID id{Repository::LogID::Pel{i}};
-        EXPECT_TRUE(repo.getPELAttributes(id));
+        Repository::LogID logID{Repository::LogID::Pel{i}};
+        EXPECT_TRUE(repo.getPELAttributes(logID));
     }
 
     auto IDs = repo.prune(id);
@@ -728,8 +728,8 @@
     // Can no longer find the oldest 20 PELs.
     for (uint32_t i = 1; i <= 20; i++)
     {
-        Repository::LogID id{Repository::LogID::Pel{i}};
-        EXPECT_FALSE(repo.getPELAttributes(id));
+        Repository::LogID logID{Repository::LogID::Pel{i}};
+        EXPECT_FALSE(repo.getPELAttributes(logID));
         EXPECT_TRUE(std::find(IDs.begin(), IDs.end(), 500 + i) != IDs.end());
     }
 }
@@ -760,11 +760,11 @@
         auto idToDelete = pel->obmcLogID();
         repo.add(pel);
 
-        if (0 == i)
+        if (1 == i)
         {
             repo.setPELHMCTransState(pel->id(), TransmissionState::acked);
         }
-        else if (1 == i)
+        else if (2 == i)
         {
             repo.setPELHostTransState(pel->id(), TransmissionState::acked);
         }