Add -Wextra-semi

Add compiler warnings for extra semi colons. Remove
existing extra semi colons.

Test: Build with `mm`
Fixed: b/301589001

Change-Id: I5ca05e719e286dae479de40d3e70ea471697faa5
diff --git a/Android.bp b/Android.bp
index 8fe976a..6d2d86f 100644
--- a/Android.bp
+++ b/Android.bp
@@ -784,6 +784,7 @@
         "-DCHRE_TEST_WIFI_RANGING_RESULT_TIMEOUT_NS=300000000",
         "-DCHRE_TEST_ASYNC_RESULT_TIMEOUT_NS=300000000",
         "-DCHRE_BLE_READ_RSSI_SUPPORT_ENABLED",
+        "-Wextra-semi",
     ],
 }
 
diff --git a/core/include/chre/core/gnss_manager.h b/core/include/chre/core/gnss_manager.h
index 7b88d31..d4885ff 100644
--- a/core/include/chre/core/gnss_manager.h
+++ b/core/include/chre/core/gnss_manager.h
@@ -413,11 +413,11 @@
 
   GnssSession &getLocationSession() {
     return mLocationSession;
-  };
+  }
 
   GnssSession &getMeasurementSession() {
     return mMeasurementSession;
-  };
+  }
 
   /**
    * Invoked when the host notifies CHRE of a settings change.
diff --git a/core/include/chre/core/host_endpoint_manager.h b/core/include/chre/core/host_endpoint_manager.h
index 40781bb..8fd7e09 100644
--- a/core/include/chre/core/host_endpoint_manager.h
+++ b/core/include/chre/core/host_endpoint_manager.h
@@ -90,6 +90,6 @@
   auto getHostNotificationCallback();
 };
 
-};  // namespace chre
+}  // namespace chre
 
 #endif  // CHRE_CORE_HOST_ENDPOINT_MANAGER_H_
diff --git a/host/common/include/chre_host/preloaded_nanoapp_loader.h b/host/common/include/chre_host/preloaded_nanoapp_loader.h
index 9719c6b..3a3a2fc 100644
--- a/host/common/include/chre_host/preloaded_nanoapp_loader.h
+++ b/host/common/include/chre_host/preloaded_nanoapp_loader.h
@@ -48,7 +48,7 @@
  public:
   explicit PreloadedNanoappLoader(ChreConnection *connection,
                                   std::string configPath)
-      : mConnection(connection), mConfigPath(std::move(configPath)){};
+      : mConnection(connection), mConfigPath(std::move(configPath)) {}
 
   ~PreloadedNanoappLoader() = default;
   /**
@@ -80,7 +80,7 @@
   /** Returns true if the loading is ongoing. */
   [[nodiscard]] bool isPreloadOngoing() const {
     return mIsPreloadingOngoing;
-  };
+  }
 
  private:
   /** Tracks the transaction state of the ongoing nanoapp loading */
diff --git a/host/test/hal_generic/common/hal_client_manager_test.cc b/host/test/hal_generic/common/hal_client_manager_test.cc
index 5673a84..8dcd59c 100644
--- a/host/test/hal_generic/common/hal_client_manager_test.cc
+++ b/host/test/hal_generic/common/hal_client_manager_test.cc
@@ -91,7 +91,7 @@
   HalClientManagerForTest(DeadClientUnlinker deadClientUnlinker,
                           const std::string &clientIdMappingFilePath)
       : HalClientManager(std::move(deadClientUnlinker),
-                         clientIdMappingFilePath){};
+                         clientIdMappingFilePath) {}
 
   const std::vector<HalClient> getClients() {
     return mClients;
@@ -116,8 +116,8 @@
     // Clears out the mapping file content
     std::ofstream file(kClientIdMappingFilePath);
     ASSERT_TRUE(file.good());
-  };
-  void TearDown() override{};
+  }
+  void TearDown() override {}
 };
 
 auto mockDeadClientUnlinker =
diff --git a/platform/include/chre/platform/atomic.h b/platform/include/chre/platform/atomic.h
index 7688c49..445feb9 100644
--- a/platform/include/chre/platform/atomic.h
+++ b/platform/include/chre/platform/atomic.h
@@ -53,7 +53,7 @@
    */
   operator bool() const {
     return load();
-  };
+  }
 
   /**
    * Atomically loads the current value of the atomic object.
diff --git a/test/simulation/inc/test_util.h b/test/simulation/inc/test_util.h
index 70c90ae..9e79601 100644
--- a/test/simulation/inc/test_util.h
+++ b/test/simulation/inc/test_util.h
@@ -70,15 +70,15 @@
   // NanoappStart Entrypoint.
   virtual bool start() {
     return true;
-  };
+  }
 
   // nanoappHandleEvent Entrypoint.
   virtual void handleEvent(uint32_t /*senderInstanceId*/,
-                           uint16_t /*eventType*/,
-                           const void * /*eventData*/){};
+                           uint16_t /*eventType*/, const void * /*eventData*/) {
+  }
 
   // nanoappEnd Entrypoint.
-  virtual void end(){};
+  virtual void end() {}
 
   const char *name() {
     return mTestNanoappInfo.name;
diff --git a/test/simulation/test_util.cc b/test/simulation/test_util.cc
index 9df001d..44398ab 100644
--- a/test/simulation/test_util.cc
+++ b/test/simulation/test_util.cc
@@ -177,7 +177,7 @@
                                uint16_t /*eventType*/,
                                const void * /*eventData*/) {}
 
-void defaultNanoappEnd(){};
+void defaultNanoappEnd() {}
 
 void loadNanoapp(const char *name, uint64_t appId, uint32_t appVersion,
                  uint32_t appPerms, decltype(nanoappStart) *startFunc,
diff --git a/util/include/chre/util/intrusive_list_base.h b/util/include/chre/util/intrusive_list_base.h
index 212b524..76c8909 100644
--- a/util/include/chre/util/intrusive_list_base.h
+++ b/util/include/chre/util/intrusive_list_base.h
@@ -53,7 +53,7 @@
   IntrusiveListBase() {
     mSentinelNode.next = &mSentinelNode;
     mSentinelNode.prev = &mSentinelNode;
-  };
+  }
 
   /**
    * Link a new node to the end of the linked list.
diff --git a/util/include/chre/util/segmented_queue.h b/util/include/chre/util/segmented_queue.h
index d3d7fb5..025d2f0 100644
--- a/util/include/chre/util/segmented_queue.h
+++ b/util/include/chre/util/segmented_queue.h
@@ -92,7 +92,7 @@
    */
   bool empty() const {
     return mSize == 0;
-  };
+  }
 
   /**
    * Push a element to the end of the segmented queue.
@@ -403,4 +403,4 @@
 
 #include "chre/util/segmented_queue_impl.h"
 
-#endif  // CHRE_UTIL_SEGMENTED_QUEUE_H_
\ No newline at end of file
+#endif  // CHRE_UTIL_SEGMENTED_QUEUE_H_
diff --git a/util/include/chre/util/system/stats_container.h b/util/include/chre/util/system/stats_container.h
index d2e18d4..4a5e404 100644
--- a/util/include/chre/util/system/stats_container.h
+++ b/util/include/chre/util/system/stats_container.h
@@ -41,7 +41,7 @@
    * it should not be bigger than the default value to prevent rounding to 0
    */
   StatsContainer(uint32_t averageWindow_ = 512)
-      : mAverageWindow(averageWindow_){};
+      : mAverageWindow(averageWindow_) {}
 
   /**
    * Add a new value to the metric collection and update mean/max value
@@ -68,14 +68,14 @@
    */
   T getMean() const {
     return mMean;
-  };
+  }
 
   /**
    * @return the max value
    */
   T getMax() const {
     return mMax;
-  };
+  }
 
   /**
    * @return the average window
@@ -97,4 +97,4 @@
 
 }  // namespace chre
 
-#endif  // CHRE_UTIL_SYSTEM_STATS_CONTAINER_H_
\ No newline at end of file
+#endif  // CHRE_UTIL_SYSTEM_STATS_CONTAINER_H_