Check in a clang-tidy
This should've been done when we first created the repo, but better late
than never.
Signed-off-by: Ed Tanous <edtanous@google.com>
Signed-off-by: John Edward Broadbent <jebr@google.com>
Change-Id: I68da1d13167ec94f9d008dea307c9f23a991d42c
diff --git a/src/test/erase/zero_test.cpp b/src/test/erase/zero_test.cpp
index 70a62e2..846059d 100644
--- a/src/test/erase/zero_test.cpp
+++ b/src/test/erase/zero_test.cpp
@@ -17,7 +17,6 @@
using estoraged::Zero;
using sdbusplus::xyz::openbmc_project::Common::Error::InternalFailure;
-using stdplus::fd::ManagedFd;
namespace estoraged_test
{
@@ -61,9 +60,10 @@
std::ofstream testFile;
// open the file and write none zero to it
- int dummyValue = 0x88776655;
+ uint32_t dummyValue = 0x88776655;
testFile.open(testFileName, std::ios::binary | std::ios::out);
- testFile.write((const char*)&dummyValue, sizeof(dummyValue));
+ testFile.write((reinterpret_cast<const char*>(&dummyValue)),
+ sizeof(dummyValue));
testFile.close();
uint64_t size = 4096;
Zero pass(testFileName);
@@ -88,7 +88,7 @@
uint64_t size = 4096;
Zero pass(testFileName);
- int dummyValue = 88;
+ uint32_t dummyValue = 88;
EXPECT_NO_THROW(pass.writeZero(size - sizeof(dummyValue)));
// open the file and write none zero to it