Fixing compilation warnings

Change-Id: I3a1a361e6e8d40d2ac505b3c8d065c00224f1c2f
diff --git a/lib/arm_profiler/src/arm_profiler.cpp b/lib/arm_profiler/src/arm_profiler.cpp
index c58037f..95bc3e4 100644
--- a/lib/arm_profiler/src/arm_profiler.cpp
+++ b/lib/arm_profiler/src/arm_profiler.cpp
@@ -28,7 +28,7 @@
 
 namespace tflite {
 
-ArmProfiler::ArmProfiler(size_t max_events) : max_events_(max_events) {
+ArmProfiler::ArmProfiler(size_t max_events) : max_events_(max_events), num_events_(0) {
     tags_        = std::make_unique<const char *[]>(max_events_);
     start_ticks_ = std::make_unique<int32_t[]>(max_events_);
     end_ticks_   = std::make_unique<int32_t[]>(max_events_);
@@ -39,9 +39,11 @@
         tflite::GetMicroErrorReporter()->Report("Profiling event overflow, max: %u events", max_events_);
         num_events_ = 0;
     }
+
     tags_[num_events_]        = tag;
     start_ticks_[num_events_] = GetCurrentTimeTicks();
     end_ticks_[num_events_]   = start_ticks_[num_events_] - 1;
+
     return num_events_++;
 }
 
@@ -54,9 +56,11 @@
 
 int32_t ArmProfiler::GetTotalTicks() const {
     int32_t ticks = 0;
-    for (int i = 0; i < num_events_; ++i) {
+
+    for (size_t i = 0; i < num_events_; ++i) {
         ticks += end_ticks_[i] - start_ticks_[i];
     }
+
     return ticks;
 }