fix constVariableReference cpp style check

Declaring the const-ness of a parameter is just another form of
type safety. The benefit of const correctness is that it prevents
you from inadvertently modifying something you didn’t expect
would be modified. The commit fixes places in the code where a
parameter could be a constant.

Change-Id: Ie6f1d4b37373979a3efef8cb617294d41dec888c
Signed-off-by: Pavithra Barithaya <pavithrabarithaya07@gmail.com>
diff --git a/libpldmresponder/fru.cpp b/libpldmresponder/fru.cpp
index a9ef613..d9702ff 100644
--- a/libpldmresponder/fru.cpp
+++ b/libpldmresponder/fru.cpp
@@ -100,7 +100,7 @@
 
                 pldm_entity entity = *entityPtr;
 
-                for (auto& it : objToEntityNode)
+                for (const auto& it : objToEntityNode)
                 {
                     pldm_entity node = pldm_entity_extract(it.second);
                     if (node.entity_type == entity.entity_type)
diff --git a/libpldmresponder/test/libpldmresponder_bios_config_test.cpp b/libpldmresponder/test/libpldmresponder_bios_config_test.cpp
index 9bcf096..16c88f1 100644
--- a/libpldmresponder/test/libpldmresponder_bios_config_test.cpp
+++ b/libpldmresponder/test/libpldmresponder_bios_config_test.cpp
@@ -39,7 +39,7 @@
             "./bios_jsons/enum_attrs.json",
         };
 
-        for (auto& path : paths)
+        for (const auto& path : paths)
         {
             std::ifstream file;
             file.open(path);