Fix clang-tidy 14 issues

Signed-off-by: Ed Tanous <edtanous@google.com>
Change-Id: Idb76ae375eff9a143497942013d94ca3b3252495
diff --git a/tests/test_Utils.cpp b/tests/test_Utils.cpp
index a66b70c..7b6b947 100644
--- a/tests/test_Utils.cpp
+++ b/tests/test_Utils.cpp
@@ -27,10 +27,12 @@
         fs::create_directory(hwmonDir);
         auto hwmon10 = hwmonDir / "hwmon10";
         fs::create_directory(hwmonDir / "hwmon10");
-        std::ofstream{hwmon10 / "temp1_input"};
-        std::ofstream{hwmon10 / "temp1_min"};
-        std::ofstream{hwmon10 / "temp1_max"};
-        std::ofstream{hwmon10 / "temp2_input"};
+        {
+            std::ofstream temp1Input{hwmon10 / "temp1_input"};
+            std::ofstream temp1Min{hwmon10 / "temp1_min"};
+            std::ofstream temp1Max{hwmon10 / "temp1_max"};
+            std::ofstream temp2Input{hwmon10 / "temp2_input"};
+        }
         createPECIDir();
     }
 
@@ -50,10 +52,12 @@
         auto peci0 =
             peciDir / "peci-0/device/0-30/peci-cputemp.0/hwmon/hwmon25";
         fs::create_directories(peci0);
-        std::ofstream{peci0 / "temp0_input"};
-        std::ofstream{peci0 / "temp1_input"};
-        std::ofstream{peci0 / "temp2_input"};
-        std::ofstream{peci0 / "name"};
+        {
+            std::ofstream temp0Input{peci0 / "temp0_input"};
+            std::ofstream temp1Input{peci0 / "temp1_input"};
+            std::ofstream temp2Input{peci0 / "temp2_input"};
+            std::ofstream name{peci0 / "name"};
+        }
         auto devDir = peciDir / "peci-0/peci_dev/peci-0";
         fs::create_directories(devDir);
         fs::create_directory_symlink("../../../peci-0", devDir / "device");