Fix some cppcheck warnings

Fix some of the warnings in the base phosphor-logging code.

It doesn't fix all of them - some are false positives and some are just
suggestions, but it does bring down the number a bit to make it easier
to spot real issues.

Signed-off-by: Matt Spinler <spinler@us.ibm.com>
Change-Id: I8a131cbc2941ccba79ef3775151007c770207bd5
diff --git a/elog_serialize.cpp b/elog_serialize.cpp
index 087ef40..b8e2cd6 100644
--- a/elog_serialize.cpp
+++ b/elog_serialize.cpp
@@ -130,13 +130,13 @@
         }
         return false;
     }
-    catch (const cereal::Exception& e)
+    catch (const cereal::Exception& ex)
     {
-        log<level::ERR>(e.what());
+        log<level::ERR>(ex.what());
         fs::remove(path);
         return false;
     }
-    catch (const std::length_error& e)
+    catch (const std::length_error& ex)
     {
         // Running into: USCiLab/cereal#192
         // This may be indicating some other issue in the
@@ -144,7 +144,7 @@
         // possibly associations ??. But handling it here for
         // now since we are anyway tossing the log
         // TODO: openbmc/phosphor-logging#8
-        log<level::ERR>(e.what());
+        log<level::ERR>(ex.what());
         fs::remove(path);
         return false;
     }