cleanup: Fix warnings found by cppcheck

Fix various warnings found by cppcheck.

Signed-off-by: Lei YU <yulei.sh@bytedance.com>
Change-Id: I4db2319f5890d7aa73c8f418f610a6cba338ce24
diff --git a/image_verify.cpp b/image_verify.cpp
index d67cfac..098ad9d 100644
--- a/image_verify.cpp
+++ b/image_verify.cpp
@@ -413,7 +413,7 @@
         sigFile += SIGNATURE_FILE_EXT;
 
         // Verify the signature.
-        auto valid = verifyFile(file, sigFile, publicKeyPath, hashType);
+        valid = verifyFile(file, sigFile, publicKeyPath, hashType);
         if (valid == false)
         {
             error("Image file Signature Validation failed on {PATH}", "PATH",