libhardening: Initialize 'val'
We initialize 'val' like is done in the other functions here
prior to incrementing it.
Test: TreeHugger
Change-Id: If2063d76964c4f17494fa56f5903c58158dc2925
diff --git a/libhardening/hardening_benchmark.cpp b/libhardening/hardening_benchmark.cpp
index 50f95bd..611a648 100644
--- a/libhardening/hardening_benchmark.cpp
+++ b/libhardening/hardening_benchmark.cpp
@@ -51,7 +51,7 @@
auto tmp = makeFile();
auto mapping = android::base::MappedFile::FromFd(tmp->fd, 0, 1, PROT_READ);
- int val;
+ int val = 0;
for (auto _ : state) {
HANDLE_SIGBUS({ break; });
val += *mapping->data();