InfiniTime.git

commit a3e14c012d76fc8f7ad4c16ad9dc67e8995ce10e

Author: Riku Isokoski <riksu9000@gmail.com>

src: Enable unused parameter warning

Fix warnings.
Some clang-formatting was necessary.
DebugPins is unused and was removed.

 CMakeLists.txt | 9 ---
 src/CMakeLists.txt | 7 +-
 src/components/ble/AlertNotificationClient.cpp | 6 +-
 src/components/ble/AlertNotificationClient.h | 2 
 src/components/ble/AlertNotificationService.cpp | 6 +-
 src/components/ble/AlertNotificationService.h | 2 
 src/components/ble/BatteryInformationService.cpp | 8 +--
 src/components/ble/BatteryInformationService.h | 2 
 src/components/ble/CurrentTimeClient.cpp | 2 
 src/components/ble/CurrentTimeService.cpp | 16 +++---
 src/components/ble/CurrentTimeService.h | 6 +-
 src/components/ble/DeviceInformationService.cpp | 6 +-
 src/components/ble/DeviceInformationService.h | 4 
 src/components/ble/HeartRateService.cpp | 14 +++---
 src/components/ble/HeartRateService.h | 6 +-
 src/components/ble/ImmediateAlertService.cpp | 6 +-
 src/components/ble/ImmediateAlertService.h | 2 
 src/components/ble/MotionService.cpp | 12 ++--
 src/components/ble/MotionService.h | 6 +-
 src/components/ble/MusicService.cpp | 6 +-
 src/components/ble/MusicService.h | 2 
 src/components/ble/NavigationService.cpp | 6 +-
 src/components/ble/NavigationService.h | 2 
 src/components/ble/NimbleController.cpp | 12 ++--
 src/components/ble/weather/WeatherService.cpp | 6 +-
 src/components/ble/weather/WeatherService.h | 2 
 src/components/datetime/DateTimeController.cpp | 9 ---
 src/components/datetime/DateTimeController.h | 9 ---
 src/components/fs/FS.cpp | 6 +-
 src/components/motor/MotorController.cpp | 2 
 src/displayapp/DisplayAppRecovery.cpp | 32 +++++++-------
 src/displayapp/screens/Paddle.cpp | 4 
 src/displayapp/screens/Screen.h | 4 
 src/displayapp/screens/settings/SettingBluetooth.cpp | 8 +-
 src/displayapp/screens/settings/SettingBluetooth.h | 4 
 src/displayapp/screens/settings/SettingSetDate.cpp | 1 
 src/displayapp/screens/settings/SettingSetTime.cpp | 1 
 src/drivers/Bma421.cpp | 2 
 src/drivers/DebugPins.h | 24 ----------
 src/drivers/SpiMaster.cpp | 7 --
 src/drivers/SpiMaster.h | 5 -
 src/recoveryLoader.cpp | 2 


diff --git a/CMakeLists.txt b/CMakeLists.txt
index adb1754b280c48711bf5fe30e8fe21df2a9afa77..62c1637b1a165c9c1c13da0ab2068e68f2ef6bb0 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -24,10 +24,6 @@ if (NOT NRF5_SDK_PATH)
   message(FATAL_ERROR "The path to the NRF52 SDK must be specified on the command line (add -DNRF5_SDK_PATH=<path>")
 endif ()
 
-if(DEFINED USE_DEBUG_PINS AND USE_DEBUG_PINS)
-  add_definitions(-DUSE_DEBUG_PINS)
-endif()
-
 if(BUILD_DFU)
   set(BUILD_DFU true)
 endif()
@@ -59,11 +55,6 @@ message("    * Toolchain : " ${ARM_NONE_EABI_TOOLCHAIN_PATH})
 message("    * GitRef(S) : " ${PROJECT_GIT_COMMIT_HASH})
 message("    * NRF52 SDK : " ${NRF5_SDK_PATH})
 message("    * Target device : " ${TARGET_DEVICE})
-if(USE_DEBUG_PINS)
-  message("    * Debug pins : Enabled")
-else()
-  message("    * Debug pins : Disabled")
-endif()
 if(BUILD_DFU)
   message("    * Build DFU (using adafruit-nrfutil) : Enabled")
 else()




diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt
index 3eade16b6f33eefe7b6ba35d70a13ab39fae8395..c6031cd751295b0b667617f16dc7ec4c36416d67 100644
--- a/src/CMakeLists.txt
+++ b/src/CMakeLists.txt
@@ -442,7 +442,6 @@         drivers/SpiNorFlash.cpp
         drivers/SpiMaster.cpp
         drivers/Spi.cpp
         drivers/Watchdog.cpp
-        drivers/DebugPins.cpp
         drivers/InternalFlash.cpp
         drivers/Hrs3300.cpp
         drivers/Bma421.cpp
@@ -509,7 +508,6 @@         drivers/SpiNorFlash.cpp
         drivers/SpiMaster.cpp
         drivers/Spi.cpp
         drivers/Watchdog.cpp
-        drivers/DebugPins.cpp
         drivers/InternalFlash.cpp
         drivers/Hrs3300.cpp
         drivers/Bma421.cpp
@@ -625,7 +623,6 @@         drivers/SpiNorFlash.h
         drivers/SpiMaster.h
         drivers/Spi.h
         drivers/Watchdog.h
-        drivers/DebugPins.h
         drivers/InternalFlash.h
         drivers/Hrs3300.h
         drivers/PinMap.h
@@ -689,6 +686,8 @@ include_directories(
         ${CMAKE_BINARY_DIR}/src # include generated files like Version.h
         .
         ../
+)
+include_directories(SYSTEM
         libs/
         FreeRTOS/
         libs/date/include
@@ -782,7 +781,7 @@ )
 
 
 set(COMMON_FLAGS -MP -MD -mthumb -mabi=aapcs -ftree-vrp -ffunction-sections -fdata-sections -fno-strict-aliasing -fno-builtin -fshort-enums -mcpu=cortex-m4 -mfloat-abi=hard -mfpu=fpv4-sp-d16 -fstack-usage -fno-exceptions -fno-non-call-exceptions)
-set(WARNING_FLAGS -Wall -Wextra -Warray-bounds=2 -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=2 -Wformat-nonliteral -Wno-unused-parameter -Wno-missing-field-initializers -Wno-unknown-pragmas -Wno-expansion-to-defined -Wreturn-type -Werror=return-type)
+set(WARNING_FLAGS -Wall -Wextra -Warray-bounds=2 -Wformat=2 -Wformat-overflow=2 -Wformat-truncation=2 -Wformat-nonliteral -Wno-missing-field-initializers -Wno-unknown-pragmas -Wno-expansion-to-defined -Wreturn-type -Werror=return-type)
 set(DEBUG_FLAGS -Og -g3)
 set(RELEASE_FLAGS -Os)
 set(CXX_FLAGS -fno-rtti)




diff --git a/src/components/ble/AlertNotificationClient.cpp b/src/components/ble/AlertNotificationClient.cpp
index 095fdef611024ebf92af5ff354ceb4bc88f36215..e3bc9242308a7ea6381fd6a9b89ec646cd518bb8 100644
--- a/src/components/ble/AlertNotificationClient.cpp
+++ b/src/components/ble/AlertNotificationClient.cpp
@@ -35,9 +35,9 @@     auto client = static_cast(arg);
     return client->OnDescriptorDiscoveryEventCallback(conn_handle, error, chr_val_handle, dsc);
   }
 
-  int NewAlertSubcribeCallback(uint16_t conn_handle, const struct ble_gatt_error* error, struct ble_gatt_attr* attr, void* arg) {
+  int NewAlertSubcribeCallback(uint16_t conn_handle, const struct ble_gatt_error* error, struct ble_gatt_attr* /*attr*/, void* arg) {
     auto client = static_cast<AlertNotificationClient*>(arg);
-    return client->OnNewAlertSubcribe(conn_handle, error, attr);
+    return client->OnNewAlertSubcribe(conn_handle, error);
   }
 }
 
@@ -107,7 +107,7 @@   }
   return 0;
 }
 
-int AlertNotificationClient::OnNewAlertSubcribe(uint16_t connectionHandle, const ble_gatt_error* error, ble_gatt_attr* attribute) {
+int AlertNotificationClient::OnNewAlertSubcribe(uint16_t connectionHandle, const ble_gatt_error* error) {
   if (error->status == 0) {
     NRF_LOG_INFO("ANS New alert subscribe OK");
   } else {




diff --git a/src/components/ble/AlertNotificationClient.h b/src/components/ble/AlertNotificationClient.h
index 2d6a38735a193c3e8038fb6940aad2d9f31b0c1e..b038f0d8dc9a414d5d363e80c9648e130ecf6f0a 100644
--- a/src/components/ble/AlertNotificationClient.h
+++ b/src/components/ble/AlertNotificationClient.h
@@ -25,7 +25,7 @@                                        Pinetime::Controllers::NotificationManager& notificationManager);
 
       bool OnDiscoveryEvent(uint16_t connectionHandle, const ble_gatt_error* error, const ble_gatt_svc* service);
       int OnCharacteristicsDiscoveryEvent(uint16_t connectionHandle, const ble_gatt_error* error, const ble_gatt_chr* characteristic);
-      int OnNewAlertSubcribe(uint16_t connectionHandle, const ble_gatt_error* error, ble_gatt_attr* attribute);
+      int OnNewAlertSubcribe(uint16_t connectionHandle, const ble_gatt_error* error);
       int OnDescriptorDiscoveryEventCallback(uint16_t connectionHandle,
                                              const ble_gatt_error* error,
                                              uint16_t characteristicValueHandle,




diff --git a/src/components/ble/AlertNotificationService.cpp b/src/components/ble/AlertNotificationService.cpp
index 048191225f1fd09afcb338fe4b1ff17f1fb91eea..d9f28698bcea4f8cf34aed62b4edb80ec56f1d2e 100644
--- a/src/components/ble/AlertNotificationService.cpp
+++ b/src/components/ble/AlertNotificationService.cpp
@@ -11,9 +11,9 @@ constexpr ble_uuid16_t AlertNotificationService::ansUuid;
 constexpr ble_uuid16_t AlertNotificationService::ansCharUuid;
 constexpr ble_uuid128_t AlertNotificationService::notificationEventUuid;
 
-int AlertNotificationCallback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt, void* arg) {
+int AlertNotificationCallback(uint16_t /*conn_handle*/, uint16_t /*attr_handle*/, struct ble_gatt_access_ctxt* ctxt, void* arg) {
   auto anService = static_cast<AlertNotificationService*>(arg);
-  return anService->OnAlert(conn_handle, attr_handle, ctxt);
+  return anService->OnAlert(ctxt);
 }
 
 void AlertNotificationService::Init() {
@@ -44,7 +44,7 @@     systemTask {systemTask},
     notificationManager {notificationManager} {
 }
 
-int AlertNotificationService::OnAlert(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt) {
+int AlertNotificationService::OnAlert(struct ble_gatt_access_ctxt* ctxt) {
   if (ctxt->op == BLE_GATT_ACCESS_OP_WRITE_CHR) {
     constexpr size_t stringTerminatorSize = 1; // end of string '\0'
     constexpr size_t headerSize = 3;




diff --git a/src/components/ble/AlertNotificationService.h b/src/components/ble/AlertNotificationService.h
index 7f5273ac49614a9407b04a28c56dfaec98b64aff..4b3c63859072e8ee8d4ce7cc696e7622808fd2ec 100644
--- a/src/components/ble/AlertNotificationService.h
+++ b/src/components/ble/AlertNotificationService.h
@@ -25,7 +25,7 @@     public:
       AlertNotificationService(Pinetime::System::SystemTask& systemTask, Pinetime::Controllers::NotificationManager& notificationManager);
       void Init();
 
-      int OnAlert(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt);
+      int OnAlert(struct ble_gatt_access_ctxt* ctxt);
 
       void AcceptIncomingCall();
       void RejectIncomingCall();




diff --git a/src/components/ble/BatteryInformationService.cpp b/src/components/ble/BatteryInformationService.cpp
index 14589cb9591d98170c02602908ea3efeb64df78a..db7c85662245a0b043e99bc5822ed76642c42326 100644
--- a/src/components/ble/BatteryInformationService.cpp
+++ b/src/components/ble/BatteryInformationService.cpp
@@ -7,9 +7,9 @@
 constexpr ble_uuid16_t BatteryInformationService::batteryInformationServiceUuid;
 constexpr ble_uuid16_t BatteryInformationService::batteryLevelUuid;
 
-int BatteryInformationServiceCallback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt, void* arg) {
+int BatteryInformationServiceCallback(uint16_t /*conn_handle*/, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt, void* arg) {
   auto* batteryInformationService = static_cast<BatteryInformationService*>(arg);
-  return batteryInformationService->OnBatteryServiceRequested(conn_handle, attr_handle, ctxt);
+  return batteryInformationService->OnBatteryServiceRequested(attr_handle, ctxt);
 }
 
 BatteryInformationService::BatteryInformationService(Controllers::Battery& batteryController)
@@ -38,9 +38,7 @@   res = ble_gatts_add_svcs(serviceDefinition);
   ASSERT(res == 0);
 }
 
-int BatteryInformationService::OnBatteryServiceRequested(uint16_t connectionHandle,
-                                                         uint16_t attributeHandle,
-                                                         ble_gatt_access_ctxt* context) {
+int BatteryInformationService::OnBatteryServiceRequested(uint16_t attributeHandle, ble_gatt_access_ctxt* context) {
   if (attributeHandle == batteryLevelHandle) {
     NRF_LOG_INFO("BATTERY : handle = %d", batteryLevelHandle);
     uint8_t batteryValue = batteryController.PercentRemaining();




diff --git a/src/components/ble/BatteryInformationService.h b/src/components/ble/BatteryInformationService.h
index cc4d260482974332a300a1f80027dc8097626150..7f0a89adcf9fb6ca10740e286154397832d66f26 100644
--- a/src/components/ble/BatteryInformationService.h
+++ b/src/components/ble/BatteryInformationService.h
@@ -18,7 +18,7 @@     public:
       BatteryInformationService(Controllers::Battery& batteryController);
       void Init();
 
-      int OnBatteryServiceRequested(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt* context);
+      int OnBatteryServiceRequested(uint16_t attributeHandle, ble_gatt_access_ctxt* context);
       void NotifyBatteryLevel(uint16_t connectionHandle, uint8_t level);
 
     private:




diff --git a/src/components/ble/CurrentTimeClient.cpp b/src/components/ble/CurrentTimeClient.cpp
index 961345262a7d9051617948ca6ed7bb3478360f82..e535ae83c2af4601d0c7d2158449a6da1f5ec003 100644
--- a/src/components/ble/CurrentTimeClient.cpp
+++ b/src/components/ble/CurrentTimeClient.cpp
@@ -89,7 +89,7 @@     uint16_t year = ((uint16_t) result.year_MSO << 8) + result.year_LSO;
 
     NRF_LOG_INFO("Received data: %d-%d-%d %d:%d:%d", year, result.month, result.dayofmonth, result.hour, result.minute, result.second);
     dateTimeController
-      .SetTime(year, result.month, result.dayofmonth, 0, result.hour, result.minute, result.second, nrf_rtc_counter_get(portNRF_RTC_REG));
+      .SetTime(year, result.month, result.dayofmonth, result.hour, result.minute, result.second, nrf_rtc_counter_get(portNRF_RTC_REG));
   } else {
     NRF_LOG_INFO("Error retrieving current time: %d", error->status);
   }




diff --git a/src/components/ble/CurrentTimeService.cpp b/src/components/ble/CurrentTimeService.cpp
index a264efbaaf98af9ee216f14bfe18b6cf699323fd..856bc63a2e1c8e1465701396cd7e97e71d47471b 100644
--- a/src/components/ble/CurrentTimeService.cpp
+++ b/src/components/ble/CurrentTimeService.cpp
@@ -8,18 +8,18 @@ constexpr ble_uuid16_t CurrentTimeService::ctsUuid;
 constexpr ble_uuid16_t CurrentTimeService::ctsCtChrUuid;
 constexpr ble_uuid16_t CurrentTimeService::ctsLtChrUuid;
 
-int CTSCallback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt, void* arg) {
+int CTSCallback(uint16_t /*conn_handle*/, uint16_t /*attr_handle*/, struct ble_gatt_access_ctxt* ctxt, void* arg) {
   auto cts = static_cast<CurrentTimeService*>(arg);
 
-  return cts->OnCurrentTimeServiceAccessed(conn_handle, attr_handle, ctxt);
+  return cts->OnCurrentTimeServiceAccessed(ctxt);
 }
 
-int CurrentTimeService::OnCurrentTimeServiceAccessed(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt) {
+int CurrentTimeService::OnCurrentTimeServiceAccessed(struct ble_gatt_access_ctxt* ctxt) {
   switch (ble_uuid_u16(ctxt->chr->uuid)) {
     case ctsCurrentTimeCharId:
-      return OnCurrentTimeAccessed(conn_handle, attr_handle, ctxt);
+      return OnCurrentTimeAccessed(ctxt);
     case ctsLocalTimeCharId:
-      return OnLocalTimeAccessed(conn_handle, attr_handle, ctxt);
+      return OnLocalTimeAccessed(ctxt);
   }
   return -1; // Unknown characteristic
 }
@@ -34,7 +34,7 @@
   ASSERT(res == 0);
 }
 
-int CurrentTimeService::OnCurrentTimeAccessed(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt) {
+int CurrentTimeService::OnCurrentTimeAccessed(struct ble_gatt_access_ctxt* ctxt) {
 
   NRF_LOG_INFO("Setting time...");
 
@@ -51,7 +51,7 @@
     NRF_LOG_INFO("Received data: %d-%d-%d %d:%d:%d", year, result.month, result.dayofmonth, result.hour, result.minute, result.second);
 
     m_dateTimeController
-      .SetTime(year, result.month, result.dayofmonth, 0, result.hour, result.minute, result.second, nrf_rtc_counter_get(portNRF_RTC_REG));
+      .SetTime(year, result.month, result.dayofmonth, result.hour, result.minute, result.second, nrf_rtc_counter_get(portNRF_RTC_REG));
 
   } else if (ctxt->op == BLE_GATT_ACCESS_OP_READ_CHR) {
     CtsCurrentTimeData currentDateTime;
@@ -71,7 +71,7 @@
   return 0;
 }
 
-int CurrentTimeService::OnLocalTimeAccessed(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt) {
+int CurrentTimeService::OnLocalTimeAccessed(struct ble_gatt_access_ctxt* ctxt) {
   NRF_LOG_INFO("Setting timezone...");
 
   if (ctxt->op == BLE_GATT_ACCESS_OP_WRITE_CHR) {




diff --git a/src/components/ble/CurrentTimeService.h b/src/components/ble/CurrentTimeService.h
index 9933923dde9e959204de63ae5993cc765a95c8ac..bec75a2bd42bac1129492d2bbfd7e778f24b0dd1 100644
--- a/src/components/ble/CurrentTimeService.h
+++ b/src/components/ble/CurrentTimeService.h
@@ -16,9 +16,9 @@     public:
       CurrentTimeService(DateTime& dateTimeController);
       void Init();
 
-      int OnCurrentTimeServiceAccessed(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt);
-      int OnCurrentTimeAccessed(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt);
-      int OnLocalTimeAccessed(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt);
+      int OnCurrentTimeServiceAccessed(struct ble_gatt_access_ctxt* ctxt);
+      int OnCurrentTimeAccessed(struct ble_gatt_access_ctxt* ctxt);
+      int OnLocalTimeAccessed(struct ble_gatt_access_ctxt* ctxt);
 
     private:
       static constexpr uint16_t ctsId {0x1805};




diff --git a/src/components/ble/DeviceInformationService.cpp b/src/components/ble/DeviceInformationService.cpp
index 0f47c90f483e207b9bf9b98b879e33ef12b08ed7..f0d1b5a70cef9eccadd674eceaaf0b44891b7483 100644
--- a/src/components/ble/DeviceInformationService.cpp
+++ b/src/components/ble/DeviceInformationService.cpp
@@ -10,9 +10,9 @@ constexpr ble_uuid16_t DeviceInformationService::deviceInfoUuid;
 constexpr ble_uuid16_t DeviceInformationService::hwRevisionUuid;
 constexpr ble_uuid16_t DeviceInformationService::swRevisionUuid;
 
-int DeviceInformationCallback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt, void* arg) {
+int DeviceInformationCallback(uint16_t /*conn_handle*/, uint16_t /*attr_handle*/, struct ble_gatt_access_ctxt* ctxt, void* arg) {
   auto deviceInformationService = static_cast<DeviceInformationService*>(arg);
-  return deviceInformationService->OnDeviceInfoRequested(conn_handle, attr_handle, ctxt);
+  return deviceInformationService->OnDeviceInfoRequested(ctxt);
 }
 
 void DeviceInformationService::Init() {
@@ -24,7 +24,7 @@   res = ble_gatts_add_svcs(serviceDefinition);
   ASSERT(res == 0);
 }
 
-int DeviceInformationService::OnDeviceInfoRequested(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt) {
+int DeviceInformationService::OnDeviceInfoRequested(struct ble_gatt_access_ctxt* ctxt) {
   const char* str;
 
   switch (ble_uuid_u16(ctxt->chr->uuid)) {




diff --git a/src/components/ble/DeviceInformationService.h b/src/components/ble/DeviceInformationService.h
index a269afb40b409c836368f31ed2968e4d4fb0e656..c4babd1b6a6fff3254355873dc2a711c10192cce 100644
--- a/src/components/ble/DeviceInformationService.h
+++ b/src/components/ble/DeviceInformationService.h
@@ -14,7 +14,7 @@     public:
       DeviceInformationService();
       void Init();
 
-      int OnDeviceInfoRequested(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt);
+      int OnDeviceInfoRequested(struct ble_gatt_access_ctxt* ctxt);
 
     private:
       static constexpr uint16_t deviceInfoId {0x180a};
@@ -50,4 +50,4 @@       struct ble_gatt_chr_def characteristicDefinition[7];
       struct ble_gatt_svc_def serviceDefinition[2];
     };
   }
-}
\ No newline at end of file
+}




diff --git a/src/components/ble/HeartRateService.cpp b/src/components/ble/HeartRateService.cpp
index d49a02c8356464d6690326189985bddae50a0c67..c522e67e4522a6b55dd0def1921e155e0df6b952 100644
--- a/src/components/ble/HeartRateService.cpp
+++ b/src/components/ble/HeartRateService.cpp
@@ -9,9 +9,9 @@ constexpr ble_uuid16_t HeartRateService::heartRateServiceUuid;
 constexpr ble_uuid16_t HeartRateService::heartRateMeasurementUuid;
 
 namespace {
-  int HeartRateServiceCallback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt, void* arg) {
+  int HeartRateServiceCallback(uint16_t /*conn_handle*/, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt, void* arg) {
     auto* heartRateService = static_cast<HeartRateService*>(arg);
-    return heartRateService->OnHeartRateRequested(conn_handle, attr_handle, ctxt);
+    return heartRateService->OnHeartRateRequested(attr_handle, ctxt);
   }
 }
 
@@ -45,7 +45,7 @@   res = ble_gatts_add_svcs(serviceDefinition);
   ASSERT(res == 0);
 }
 
-int HeartRateService::OnHeartRateRequested(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt* context) {
+int HeartRateService::OnHeartRateRequested(uint16_t attributeHandle, ble_gatt_access_ctxt* context) {
   if (attributeHandle == heartRateMeasurementHandle) {
     NRF_LOG_INFO("HEARTRATE : handle = %d", heartRateMeasurementHandle);
     uint8_t buffer[2] = {0, heartRateController.HeartRate()}; // [0] = flags, [1] = hr value
@@ -60,7 +60,7 @@ void HeartRateService::OnNewHeartRateValue(uint8_t heartRateValue) {
   if (!heartRateMeasurementNotificationEnable)
     return;
 
-  uint8_t buffer[2] = {0, heartRateController.HeartRate()}; // [0] = flags, [1] = hr value
+  uint8_t buffer[2] = {0, heartRateValue}; // [0] = flags, [1] = hr value
   auto* om = ble_hs_mbuf_from_flat(buffer, 2);
 
   uint16_t connectionHandle = system.nimble().connHandle();
@@ -72,12 +72,12 @@
   ble_gattc_notify_custom(connectionHandle, heartRateMeasurementHandle, om);
 }
 
-void HeartRateService::SubscribeNotification(uint16_t connectionHandle, uint16_t attributeHandle) {
+void HeartRateService::SubscribeNotification(uint16_t attributeHandle) {
   if (attributeHandle == heartRateMeasurementHandle)
     heartRateMeasurementNotificationEnable = true;
 }
 
-void HeartRateService::UnsubscribeNotification(uint16_t connectionHandle, uint16_t attributeHandle) {
+void HeartRateService::UnsubscribeNotification(uint16_t attributeHandle) {
   if (attributeHandle == heartRateMeasurementHandle)
     heartRateMeasurementNotificationEnable = false;
-}
\ No newline at end of file
+}




diff --git a/src/components/ble/HeartRateService.h b/src/components/ble/HeartRateService.h
index a60c12f672d79ba3ba142af87d462fbbadb04cf8..003bdbd133b80a62de58f19db9ac40f63a3a3e81 100644
--- a/src/components/ble/HeartRateService.h
+++ b/src/components/ble/HeartRateService.h
@@ -18,11 +18,11 @@     class HeartRateService {
     public:
       HeartRateService(Pinetime::System::SystemTask& system, Controllers::HeartRateController& heartRateController);
       void Init();
-      int OnHeartRateRequested(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt* context);
+      int OnHeartRateRequested(uint16_t attributeHandle, ble_gatt_access_ctxt* context);
       void OnNewHeartRateValue(uint8_t hearRateValue);
 
-      void SubscribeNotification(uint16_t connectionHandle, uint16_t attributeHandle);
-      void UnsubscribeNotification(uint16_t connectionHandle, uint16_t attributeHandle);
+      void SubscribeNotification(uint16_t attributeHandle);
+      void UnsubscribeNotification(uint16_t attributeHandle);
 
     private:
       Pinetime::System::SystemTask& system;




diff --git a/src/components/ble/ImmediateAlertService.cpp b/src/components/ble/ImmediateAlertService.cpp
index c80b378385b4a9023cda8a44aea34c284ba3df26..b9de615aa0a504555c2267de73d37217383bbfb0 100644
--- a/src/components/ble/ImmediateAlertService.cpp
+++ b/src/components/ble/ImmediateAlertService.cpp
@@ -9,9 +9,9 @@ constexpr ble_uuid16_t ImmediateAlertService::immediateAlertServiceUuid;
 constexpr ble_uuid16_t ImmediateAlertService::alertLevelUuid;
 
 namespace {
-  int AlertLevelCallback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt, void* arg) {
+  int AlertLevelCallback(uint16_t /*conn_handle*/, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt, void* arg) {
     auto* immediateAlertService = static_cast<ImmediateAlertService*>(arg);
-    return immediateAlertService->OnAlertLevelChanged(conn_handle, attr_handle, ctxt);
+    return immediateAlertService->OnAlertLevelChanged(attr_handle, ctxt);
   }
 
   const char* ToString(ImmediateAlertService::Levels level) {
@@ -56,7 +56,7 @@   res = ble_gatts_add_svcs(serviceDefinition);
   ASSERT(res == 0);
 }
 
-int ImmediateAlertService::OnAlertLevelChanged(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt* context) {
+int ImmediateAlertService::OnAlertLevelChanged(uint16_t attributeHandle, ble_gatt_access_ctxt* context) {
   if (attributeHandle == alertLevelHandle) {
     if (context->op == BLE_GATT_ACCESS_OP_WRITE_CHR) {
       auto alertLevel = static_cast<Levels>(context->om->om_data[0]);




diff --git a/src/components/ble/ImmediateAlertService.h b/src/components/ble/ImmediateAlertService.h
index c54b63ec3c1484a0122c5ca1de751b1a0dd1894e..47a0543935aa9938cbf9c9ae2594fb7ff4a8a8b3 100644
--- a/src/components/ble/ImmediateAlertService.h
+++ b/src/components/ble/ImmediateAlertService.h
@@ -19,7 +19,7 @@       enum class Levels : uint8_t { NoAlert = 0, MildAlert = 1, HighAlert = 2 };
 
       ImmediateAlertService(Pinetime::System::SystemTask& systemTask, Pinetime::Controllers::NotificationManager& notificationManager);
       void Init();
-      int OnAlertLevelChanged(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt* context);
+      int OnAlertLevelChanged(uint16_t attributeHandle, ble_gatt_access_ctxt* context);
 
     private:
       Pinetime::System::SystemTask& systemTask;




diff --git a/src/components/ble/MotionService.cpp b/src/components/ble/MotionService.cpp
index a7e959237e2ed1b49fc6e32af7e548fd3ba3540c..604f22d52a2e1d965a7ead546d0acca93b9d4a81 100644
--- a/src/components/ble/MotionService.cpp
+++ b/src/components/ble/MotionService.cpp
@@ -21,9 +21,9 @@   constexpr ble_uuid128_t motionServiceUuid {BaseUuid()};
   constexpr ble_uuid128_t stepCountCharUuid {CharUuid(0x01, 0x00)};
   constexpr ble_uuid128_t motionValuesCharUuid {CharUuid(0x02, 0x00)};
 
-  int MotionServiceCallback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt, void* arg) {
+  int MotionServiceCallback(uint16_t /*conn_handle*/, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt, void* arg) {
     auto* motionService = static_cast<MotionService*>(arg);
-    return motionService->OnStepCountRequested(conn_handle, attr_handle, ctxt);
+    return motionService->OnStepCountRequested(attr_handle, ctxt);
   }
 }
 
@@ -59,7 +59,7 @@   res = ble_gatts_add_svcs(serviceDefinition);
   ASSERT(res == 0);
 }
 
-int MotionService::OnStepCountRequested(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt* context) {
+int MotionService::OnStepCountRequested(uint16_t attributeHandle, ble_gatt_access_ctxt* context) {
   if (attributeHandle == stepCountHandle) {
     NRF_LOG_INFO("Motion-stepcount : handle = %d", stepCountHandle);
     uint32_t buffer = motionController.NbSteps();
@@ -95,7 +95,7 @@ void MotionService::OnNewMotionValues(int16_t x, int16_t y, int16_t z) {
   if (!motionValuesNoficationEnabled)
     return;
 
-  int16_t buffer[3] = {motionController.X(), motionController.Y(), motionController.Z()};
+  int16_t buffer[3] = {x, y, z};
   auto* om = ble_hs_mbuf_from_flat(buffer, 3 * sizeof(int16_t));
 
   uint16_t connectionHandle = system.nimble().connHandle();
@@ -107,14 +107,14 @@
   ble_gattc_notify_custom(connectionHandle, motionValuesHandle, om);
 }
 
-void MotionService::SubscribeNotification(uint16_t connectionHandle, uint16_t attributeHandle) {
+void MotionService::SubscribeNotification(uint16_t attributeHandle) {
   if (attributeHandle == stepCountHandle)
     stepCountNoficationEnabled = true;
   else if (attributeHandle == motionValuesHandle)
     motionValuesNoficationEnabled = true;
 }
 
-void MotionService::UnsubscribeNotification(uint16_t connectionHandle, uint16_t attributeHandle) {
+void MotionService::UnsubscribeNotification(uint16_t attributeHandle) {
   if (attributeHandle == stepCountHandle)
     stepCountNoficationEnabled = false;
   else if (attributeHandle == motionValuesHandle)




diff --git a/src/components/ble/MotionService.h b/src/components/ble/MotionService.h
index c9483766f23f9f3e586011bc1c237f64c6bb373e..1b172528eaf4b2652dd26afbff02adbdff67de7b 100644
--- a/src/components/ble/MotionService.h
+++ b/src/components/ble/MotionService.h
@@ -18,12 +18,12 @@     class MotionService {
     public:
       MotionService(Pinetime::System::SystemTask& system, Controllers::MotionController& motionController);
       void Init();
-      int OnStepCountRequested(uint16_t connectionHandle, uint16_t attributeHandle, ble_gatt_access_ctxt* context);
+      int OnStepCountRequested(uint16_t attributeHandle, ble_gatt_access_ctxt* context);
       void OnNewStepCountValue(uint32_t stepCount);
       void OnNewMotionValues(int16_t x, int16_t y, int16_t z);
 
-      void SubscribeNotification(uint16_t connectionHandle, uint16_t attributeHandle);
-      void UnsubscribeNotification(uint16_t connectionHandle, uint16_t attributeHandle);
+      void SubscribeNotification(uint16_t attributeHandle);
+      void UnsubscribeNotification(uint16_t attributeHandle);
 
     private:
       Pinetime::System::SystemTask& system;




diff --git a/src/components/ble/MusicService.cpp b/src/components/ble/MusicService.cpp
index fc7cef01a4d63f8710858ab0cc8e7bea503130ee..403c957b5b787ca69889665540d78f2df1fb5e7b 100644
--- a/src/components/ble/MusicService.cpp
+++ b/src/components/ble/MusicService.cpp
@@ -48,8 +48,8 @@   constexpr ble_uuid128_t msShuffleCharUuid {CharUuid(0x0c, 0x00)};
 
   constexpr uint8_t MaxStringSize {40};
 
-  int MusicCallback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt, void* arg) {
-    return static_cast<Pinetime::Controllers::MusicService*>(arg)->OnCommand(conn_handle, attr_handle, ctxt);
+  int MusicCallback(uint16_t /*conn_handle*/, uint16_t /*attr_handle*/, struct ble_gatt_access_ctxt* ctxt, void* arg) {
+    return static_cast<Pinetime::Controllers::MusicService*>(arg)->OnCommand(ctxt);
   }
 }
 
@@ -122,7 +122,7 @@   res = ble_gatts_add_svcs(serviceDefinition);
   ASSERT(res == 0);
 }
 
-int Pinetime::Controllers::MusicService::OnCommand(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt) {
+int Pinetime::Controllers::MusicService::OnCommand(struct ble_gatt_access_ctxt* ctxt) {
   if (ctxt->op == BLE_GATT_ACCESS_OP_WRITE_CHR) {
     size_t notifSize = OS_MBUF_PKTLEN(ctxt->om);
     size_t bufferSize = notifSize;




diff --git a/src/components/ble/MusicService.h b/src/components/ble/MusicService.h
index 9f1042cc09ecb0f4b088c6b4f49a2a9c601c3a33..6aebc3c540acfda006291f301f51fd27cadf678c 100644
--- a/src/components/ble/MusicService.h
+++ b/src/components/ble/MusicService.h
@@ -38,7 +38,7 @@       explicit MusicService(Pinetime::System::SystemTask& system);
 
       void Init();
 
-      int OnCommand(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt);
+      int OnCommand(struct ble_gatt_access_ctxt* ctxt);
 
       void event(char event);
 




diff --git a/src/components/ble/NavigationService.cpp b/src/components/ble/NavigationService.cpp
index ea8f3a4d34fa9d783a7a5f440901da4a437ffe23..5508d08cb4bf67823cf4997acd5ccf5061ae2a41 100644
--- a/src/components/ble/NavigationService.cpp
+++ b/src/components/ble/NavigationService.cpp
@@ -39,9 +39,9 @@   constexpr ble_uuid128_t navNarrativeCharUuid {CharUuid(0x02, 0x00)};
   constexpr ble_uuid128_t navManDistCharUuid {CharUuid(0x03, 0x00)};
   constexpr ble_uuid128_t navProgressCharUuid {CharUuid(0x04, 0x00)};
 
-  int NAVCallback(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt, void* arg) {
+  int NAVCallback(uint16_t /*conn_handle*/, uint16_t /*attr_handle*/, struct ble_gatt_access_ctxt* ctxt, void* arg) {
     auto* navService = static_cast<Pinetime::Controllers::NavigationService*>(arg);
-    return navService->OnCommand(conn_handle, attr_handle, ctxt);
+    return navService->OnCommand(ctxt);
   }
 } // namespace
 
@@ -81,7 +81,7 @@   res = ble_gatts_add_svcs(serviceDefinition);
   ASSERT(res == 0);
 }
 
-int Pinetime::Controllers::NavigationService::OnCommand(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt) {
+int Pinetime::Controllers::NavigationService::OnCommand(struct ble_gatt_access_ctxt* ctxt) {
 
   if (ctxt->op == BLE_GATT_ACCESS_OP_WRITE_CHR) {
     size_t notifSize = OS_MBUF_PKTLEN(ctxt->om);




diff --git a/src/components/ble/NavigationService.h b/src/components/ble/NavigationService.h
index 78e7b888d7df90d487866fed8d7c76dd284093ce..1c1739ba72fdc91c1285798e3769a1b48da01be8 100644
--- a/src/components/ble/NavigationService.h
+++ b/src/components/ble/NavigationService.h
@@ -39,7 +39,7 @@       explicit NavigationService(Pinetime::System::SystemTask& system);
 
       void Init();
 
-      int OnCommand(uint16_t conn_handle, uint16_t attr_handle, struct ble_gatt_access_ctxt* ctxt);
+      int OnCommand(struct ble_gatt_access_ctxt* ctxt);
 
       std::string getFlag();
 




diff --git a/src/components/ble/NimbleController.cpp b/src/components/ble/NimbleController.cpp
index 52f4e4ceeff13a68e800e9163960d910413d7547..912f59276bb6a0f2938c0d6e187167e4463d5a85 100644
--- a/src/components/ble/NimbleController.cpp
+++ b/src/components/ble/NimbleController.cpp
@@ -322,14 +322,14 @@                    event->subscribe.cur_notify,
                    event->subscribe.prev_indicate);
 
       if (event->subscribe.reason == BLE_GAP_SUBSCRIBE_REASON_TERM) {
-        heartRateService.UnsubscribeNotification(event->subscribe.conn_handle, event->subscribe.attr_handle);
-        motionService.UnsubscribeNotification(event->subscribe.conn_handle, event->subscribe.attr_handle);
+        heartRateService.UnsubscribeNotification(event->subscribe.attr_handle);
+        motionService.UnsubscribeNotification(event->subscribe.attr_handle);
       } else if (event->subscribe.prev_notify == 0 && event->subscribe.cur_notify == 1) {
-        heartRateService.SubscribeNotification(event->subscribe.conn_handle, event->subscribe.attr_handle);
-        motionService.SubscribeNotification(event->subscribe.conn_handle, event->subscribe.attr_handle);
+        heartRateService.SubscribeNotification(event->subscribe.attr_handle);
+        motionService.SubscribeNotification(event->subscribe.attr_handle);
       } else if (event->subscribe.prev_notify == 1 && event->subscribe.cur_notify == 0) {
-        heartRateService.UnsubscribeNotification(event->subscribe.conn_handle, event->subscribe.attr_handle);
-        motionService.UnsubscribeNotification(event->subscribe.conn_handle, event->subscribe.attr_handle);
+        heartRateService.UnsubscribeNotification(event->subscribe.attr_handle);
+        motionService.UnsubscribeNotification(event->subscribe.attr_handle);
       }
       break;
 




diff --git a/src/components/ble/weather/WeatherService.cpp b/src/components/ble/weather/WeatherService.cpp
index 950b6dfdba047c730dbf9dcd48315ee2f9d58501..e606d9bf4d7a6309ed2230e7087ed267cf3ffc79 100644
--- a/src/components/ble/weather/WeatherService.cpp
+++ b/src/components/ble/weather/WeatherService.cpp
@@ -20,8 +20,8 @@ #include "WeatherService.h"
 #include "libs/QCBOR/inc/qcbor/qcbor.h"
 #include "systemtask/SystemTask.h"
 
-int WeatherCallback(uint16_t connHandle, uint16_t attrHandle, struct ble_gatt_access_ctxt* ctxt, void* arg) {
-  return static_cast<Pinetime::Controllers::WeatherService*>(arg)->OnCommand(connHandle, attrHandle, ctxt);
+int WeatherCallback(uint16_t /*connHandle*/, uint16_t /*attrHandle*/, struct ble_gatt_access_ctxt* ctxt, void* arg) {
+  return static_cast<Pinetime::Controllers::WeatherService*>(arg)->OnCommand(ctxt);
 }
 
 namespace Pinetime {
@@ -41,7 +41,7 @@       res = ble_gatts_add_svcs(serviceDefinition);
       ASSERT(res == 0);
     }
 
-    int WeatherService::OnCommand(uint16_t connHandle, uint16_t attrHandle, struct ble_gatt_access_ctxt* ctxt) {
+    int WeatherService::OnCommand(struct ble_gatt_access_ctxt* ctxt) {
       if (ctxt->op == BLE_GATT_ACCESS_OP_WRITE_CHR) {
         const uint8_t packetLen = OS_MBUF_PKTLEN(ctxt->om); // NOLINT(cppcoreguidelines-pro-bounds-pointer-arithmetic)
         if (packetLen <= 0) {




diff --git a/src/components/ble/weather/WeatherService.h b/src/components/ble/weather/WeatherService.h
index 786cad89997c281b09577dcaece46a116f2b83ab..00650e9001d3008be150fea7b1b669d6d9100468 100644
--- a/src/components/ble/weather/WeatherService.h
+++ b/src/components/ble/weather/WeatherService.h
@@ -48,7 +48,7 @@       explicit WeatherService(System::SystemTask& system, DateTime& dateTimeController);
 
       void Init();
 
-      int OnCommand(uint16_t connHandle, uint16_t attrHandle, struct ble_gatt_access_ctxt* ctxt);
+      int OnCommand(struct ble_gatt_access_ctxt* ctxt);
 
       /*
        * Helper functions for quick access to currently valid data




diff --git a/src/components/datetime/DateTimeController.cpp b/src/components/datetime/DateTimeController.cpp
index 73364b2f096b7aadaeb71a6455af5d57011001ed..b744fbb2b1aa7e6db3dd47606ddc09230e20bcd4 100644
--- a/src/components/datetime/DateTimeController.cpp
+++ b/src/components/datetime/DateTimeController.cpp
@@ -20,14 +20,7 @@   this->currentDateTime = t;
   UpdateTime(previousSystickCounter); // Update internal state without updating the time
 }
 
-void DateTime::SetTime(uint16_t year,
-                       uint8_t month,
-                       uint8_t day,
-                       uint8_t dayOfWeek,
-                       uint8_t hour,
-                       uint8_t minute,
-                       uint8_t second,
-                       uint32_t systickCounter) {
+void DateTime::SetTime(uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t systickCounter) {
   std::tm tm = {
     /* .tm_sec  = */ second,
     /* .tm_min  = */ minute,




diff --git a/src/components/datetime/DateTimeController.h b/src/components/datetime/DateTimeController.h
index 57ee35101177debfe746fd39e99c7b47fcb48e4f..74ccf4da6e2b1fa3ddd48cb9e73cf62f69fd28bc 100644
--- a/src/components/datetime/DateTimeController.h
+++ b/src/components/datetime/DateTimeController.h
@@ -31,14 +31,7 @@         November,
         December
       };
 
-      void SetTime(uint16_t year,
-                   uint8_t month,
-                   uint8_t day,
-                   uint8_t dayOfWeek,
-                   uint8_t hour,
-                   uint8_t minute,
-                   uint8_t second,
-                   uint32_t systickCounter);
+      void SetTime(uint16_t year, uint8_t month, uint8_t day, uint8_t hour, uint8_t minute, uint8_t second, uint32_t systickCounter);
 
       /*
        * setter corresponding to the BLE Set Local Time characteristic.




diff --git a/src/components/fs/FS.cpp b/src/components/fs/FS.cpp
index a67b6b3df0befbd9f3f490c003e1fd102ab484f9..0bb59afa00c482220de50f6860944f244168bcd2 100644
--- a/src/components/fs/FS.cpp
+++ b/src/components/fs/FS.cpp
@@ -115,7 +115,7 @@
     ----------- Interface between littlefs and SpiNorFlash -----------
 
 */
-int FS::SectorSync(const struct lfs_config* c) {
+int FS::SectorSync(const struct lfs_config* /*c*/) {
   return 0;
 }
 
@@ -147,7 +147,7 @@
 */
 
 namespace {
-  lv_fs_res_t lvglOpen(lv_fs_drv_t* drv, void* file_p, const char* path, lv_fs_mode_t mode) {
+  lv_fs_res_t lvglOpen(lv_fs_drv_t* drv, void* file_p, const char* path, lv_fs_mode_t /*mode*/) {
     lfs_file_t* file = static_cast<lfs_file_t*>(file_p);
     FS* filesys = static_cast<FS*>(drv->user_data);
     int res = filesys->FileOpen(file, path, LFS_O_RDONLY);
@@ -200,4 +200,4 @@
   fs_drv.user_data = this;
 
   lv_fs_drv_register(&fs_drv);
-}
\ No newline at end of file
+}




diff --git a/src/components/motor/MotorController.cpp b/src/components/motor/MotorController.cpp
index db6103f42427b2c7c5eadb63861560214e71dcbd..4e392416aef2619ff3c8f6690293b366527d309e 100644
--- a/src/components/motor/MotorController.cpp
+++ b/src/components/motor/MotorController.cpp
@@ -34,6 +34,6 @@   xTimerStop(longVib, 0);
   nrf_gpio_pin_set(PinMap::Motor);
 }
 
-void MotorController::StopMotor(TimerHandle_t xTimer) {
+void MotorController::StopMotor(TimerHandle_t /*xTimer*/) {
   nrf_gpio_pin_set(PinMap::Motor);
 }




diff --git a/src/displayapp/DisplayAppRecovery.cpp b/src/displayapp/DisplayAppRecovery.cpp
index e553aa8794c30aa3d766dd5903908fd7618bb611..ecc01e9b1e0ba7891f0877ae724596acf7f83054 100644
--- a/src/displayapp/DisplayAppRecovery.cpp
+++ b/src/displayapp/DisplayAppRecovery.cpp
@@ -11,22 +11,22 @@
 using namespace Pinetime::Applications;
 
 DisplayApp::DisplayApp(Drivers::St7789& lcd,
-                       Components::LittleVgl& lvgl,
-                       Drivers::Cst816S& touchPanel,
-                       Controllers::Battery& batteryController,
+                       Components::LittleVgl& /*lvgl*/,
+                       Drivers::Cst816S& /*touchPanel*/,
+                       Controllers::Battery& /*batteryController*/,
                        Controllers::Ble& bleController,
-                       Controllers::DateTime& dateTimeController,
-                       Drivers::WatchdogView& watchdog,
-                       Pinetime::Controllers::NotificationManager& notificationManager,
-                       Pinetime::Controllers::HeartRateController& heartRateController,
-                       Controllers::Settings& settingsController,
-                       Pinetime::Controllers::MotorController& motorController,
-                       Pinetime::Controllers::MotionController& motionController,
-                       Pinetime::Controllers::TimerController& timerController,
-                       Pinetime::Controllers::AlarmController& alarmController,
-                       Pinetime::Controllers::BrightnessController& brightnessController,
-                       Pinetime::Controllers::TouchHandler& touchHandler,
-                       Pinetime::Controllers::FS& filesystem)
+                       Controllers::DateTime& /*dateTimeController*/,
+                       Drivers::WatchdogView& /*watchdog*/,
+                       Pinetime::Controllers::NotificationManager& /*notificationManager*/,
+                       Pinetime::Controllers::HeartRateController& /*heartRateController*/,
+                       Controllers::Settings& /*settingsController*/,
+                       Pinetime::Controllers::MotorController& /*motorController*/,
+                       Pinetime::Controllers::MotionController& /*motionController*/,
+                       Pinetime::Controllers::TimerController& /*timerController*/,
+                       Pinetime::Controllers::AlarmController& /*alarmController*/,
+                       Pinetime::Controllers::BrightnessController& /*brightnessController*/,
+                       Pinetime::Controllers::TouchHandler& /*touchHandler*/,
+                       Pinetime::Controllers::FS& /*filesystem*/)
   : lcd {lcd}, bleController {bleController} {
 }
 
@@ -121,5 +121,5 @@     // TODO : should I do something here?
   }
 }
 
-void DisplayApp::Register(Pinetime::System::SystemTask* systemTask) {
+void DisplayApp::Register(Pinetime::System::SystemTask* /*systemTask*/) {
 }




diff --git a/src/displayapp/screens/Paddle.cpp b/src/displayapp/screens/Paddle.cpp
index 1fb2508531efa1328701b29f7d7dc8d4bd89f0ac..dc973957bf09e2bad9c9744882748c1730803a66 100644
--- a/src/displayapp/screens/Paddle.cpp
+++ b/src/displayapp/screens/Paddle.cpp
@@ -79,11 +79,11 @@   }
   lv_label_set_text_fmt(points, "%04d", score);
 }
 
-bool Paddle::OnTouchEvent(Pinetime::Applications::TouchEvents event) {
+bool Paddle::OnTouchEvent(Pinetime::Applications::TouchEvents /*event*/) {
   return true;
 }
 
-bool Paddle::OnTouchEvent(uint16_t x, uint16_t y) {
+bool Paddle::OnTouchEvent(uint16_t /*x*/, uint16_t y) {
   // sets the center paddle pos. (30px offset) with the the y_coordinate of the finger
   // but clamp it such that the paddle never clips off screen
   if (y < 31) {




diff --git a/src/displayapp/screens/Screen.h b/src/displayapp/screens/Screen.h
index a2452da5e18254598033900ba9fbd7e733120aba..4cf134d2ef0631b98e0b3167f9786bd1ffbf70b0 100644
--- a/src/displayapp/screens/Screen.h
+++ b/src/displayapp/screens/Screen.h
@@ -67,11 +67,11 @@         }
 
         /** @return false if the event hasn't been handled by the app, true if it has been handled */
         // Returning true will cancel lvgl tap
-        virtual bool OnTouchEvent(TouchEvents event) {
+        virtual bool OnTouchEvent(TouchEvents /*event*/) {
           return false;
         }
 
-        virtual bool OnTouchEvent(uint16_t x, uint16_t y) {
+        virtual bool OnTouchEvent(uint16_t /*x*/, uint16_t /*y*/) {
           return false;
         }
 




diff --git a/src/displayapp/screens/settings/SettingBluetooth.cpp b/src/displayapp/screens/settings/SettingBluetooth.cpp
index c66be3e9c971b8d7cf4b4e5b1aaaddd875f06759..177e18703c0fc4acb0e95685e57ff5dd7640de95 100644
--- a/src/displayapp/screens/settings/SettingBluetooth.cpp
+++ b/src/displayapp/screens/settings/SettingBluetooth.cpp
@@ -11,12 +11,12 @@
 namespace {
   void OnBluetoothDisabledEvent(lv_obj_t* obj, lv_event_t event) {
     auto* screen = static_cast<SettingBluetooth*>(obj->user_data);
-    screen->OnBluetoothDisabled(obj, event);
+    screen->OnBluetoothDisabled(event);
   }
 
   void OnBluetoothEnabledEvent(lv_obj_t* obj, lv_event_t event) {
     auto* screen = static_cast<SettingBluetooth*>(obj->user_data);
-    screen->OnBluetoothEnabled(obj, event);
+    screen->OnBluetoothEnabled(event);
   }
 }
 
@@ -75,7 +75,7 @@     app->PushMessage(Pinetime::Applications::Display::Messages::BleRadioEnableToggle);
   }
 }
 
-void SettingBluetooth::OnBluetoothDisabled(lv_obj_t* object, lv_event_t event) {
+void SettingBluetooth::OnBluetoothDisabled(lv_event_t event) {
   if (event == LV_EVENT_VALUE_CHANGED) {
     lv_checkbox_set_checked(cbEnabled, false);
     lv_checkbox_set_checked(cbDisabled, true);
@@ -83,7 +83,7 @@     settingsController.SetBleRadioEnabled(false);
   }
 }
 
-void SettingBluetooth::OnBluetoothEnabled(lv_obj_t* object, lv_event_t event) {
+void SettingBluetooth::OnBluetoothEnabled(lv_event_t event) {
   if (event == LV_EVENT_VALUE_CHANGED) {
     lv_checkbox_set_checked(cbEnabled, true);
     lv_checkbox_set_checked(cbDisabled, false);




diff --git a/src/displayapp/screens/settings/SettingBluetooth.h b/src/displayapp/screens/settings/SettingBluetooth.h
index 12bb459aa0cd8077457fc7bab00a76e017228907..35efcafe7fc67f9c13fac578bcd15168f1da76c4 100644
--- a/src/displayapp/screens/settings/SettingBluetooth.h
+++ b/src/displayapp/screens/settings/SettingBluetooth.h
@@ -17,8 +17,8 @@       public:
         SettingBluetooth(DisplayApp* app, Pinetime::Controllers::Settings& settingsController);
         ~SettingBluetooth() override;
 
-        void OnBluetoothEnabled(lv_obj_t* object, lv_event_t event);
-        void OnBluetoothDisabled(lv_obj_t* object, lv_event_t event);
+        void OnBluetoothEnabled(lv_event_t event);
+        void OnBluetoothDisabled(lv_event_t event);
 
       private:
         Controllers::Settings& settingsController;




diff --git a/src/displayapp/screens/settings/SettingSetDate.cpp b/src/displayapp/screens/settings/SettingSetDate.cpp
index fd1bc9b91941d4b94fb3154bd83d2b93ccb581ce..c58f6fca7b6e522ab023d963f91d5fecd1fc114b 100644
--- a/src/displayapp/screens/settings/SettingSetDate.cpp
+++ b/src/displayapp/screens/settings/SettingSetDate.cpp
@@ -100,7 +100,6 @@   NRF_LOG_INFO("Setting date (manually) to %04d-%02d-%02d", yearValue, monthValue, dayValue);
   dateTimeController.SetTime(yearValue,
                              monthValue,
                              dayValue,
-                             0,
                              dateTimeController.Hours(),
                              dateTimeController.Minutes(),
                              dateTimeController.Seconds(),




diff --git a/src/displayapp/screens/settings/SettingSetTime.cpp b/src/displayapp/screens/settings/SettingSetTime.cpp
index 7fad33aea306a5d23dfbcf17f652fa95885fd63f..67ea7afa2e8aba30d6e066252f7f5a70aa6c7623 100644
--- a/src/displayapp/screens/settings/SettingSetTime.cpp
+++ b/src/displayapp/screens/settings/SettingSetTime.cpp
@@ -99,7 +99,6 @@   NRF_LOG_INFO("Setting time (manually) to %02d:%02d:00", hoursValue, minutesValue);
   dateTimeController.SetTime(dateTimeController.Year(),
                              static_cast<uint8_t>(dateTimeController.Month()),
                              dateTimeController.Day(),
-                             static_cast<uint8_t>(dateTimeController.DayOfWeek()),
                              static_cast<uint8_t>(hoursValue),
                              static_cast<uint8_t>(minutesValue),
                              0,




diff --git a/src/drivers/Bma421.cpp b/src/drivers/Bma421.cpp
index 07a94329b76eae17a337d4f365ba31ca70671969..84d76ab3c041db4322b8d137e53aad531ea493cf 100644
--- a/src/drivers/Bma421.cpp
+++ b/src/drivers/Bma421.cpp
@@ -19,7 +19,7 @@     bma421->Write(reg_addr, reg_data, length);
     return 0;
   }
 
-  void user_delay(uint32_t period_us, void* intf_ptr) {
+  void user_delay(uint32_t period_us, void* /*intf_ptr*/) {
     nrf_delay_us(period_us);
   }
 }




diff --git a/src/drivers/DebugPins.h b/src/drivers/DebugPins.h
deleted file mode 100644
index b30cd2225d6caecf4c970933cf576a6bf50230cb..0000000000000000000000000000000000000000
--- a/src/drivers/DebugPins.h
+++ /dev/null
@@ -1,24 +0,0 @@
-#pragma once
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <stdint.h>
-
-typedef enum {
-  DebugPin0 = 27,
-  DebugPin1 = 29,
-  DebugPin2 = 20,
-  DebugPin3 = 17,
-  DebugPin4 = 11,
-} debugpins_pins;
-
-void debugpins_init();
-void debugpins_set(debugpins_pins pin);
-void debugpins_clear(debugpins_pins pin);
-void debugpins_pulse(debugpins_pins pin);
-
-#ifdef __cplusplus
-}
-#endif




diff --git a/src/drivers/SpiMaster.cpp b/src/drivers/SpiMaster.cpp
index 38f72fee62e0b8e7009bc95ef0a9ec9ae7336317..234884ab53276748e29806323ae241648f89d917 100644
--- a/src/drivers/SpiMaster.cpp
+++ b/src/drivers/SpiMaster.cpp
@@ -163,10 +163,7 @@   spiBaseAddress->RXD.LIST = 0;
   spiBaseAddress->EVENTS_END = 0;
 }
 
-void SpiMaster::PrepareRx(const volatile uint32_t cmdAddress,
-                          const volatile size_t cmdSize,
-                          const volatile uint32_t bufferAddress,
-                          const volatile size_t size) {
+void SpiMaster::PrepareRx(const volatile uint32_t bufferAddress, const volatile size_t size) {
   spiBaseAddress->TXD.PTR = 0;
   spiBaseAddress->TXD.MAXCNT = 0;
   spiBaseAddress->TXD.LIST = 0;
@@ -234,7 +231,7 @@   spiBaseAddress->TASKS_START = 1;
   while (spiBaseAddress->EVENTS_END == 0)
     ;
 
-  PrepareRx((uint32_t) cmd, cmdSize, (uint32_t) data, dataSize);
+  PrepareRx((uint32_t) data, dataSize);
   spiBaseAddress->TASKS_START = 1;
 
   while (spiBaseAddress->EVENTS_END == 0)




diff --git a/src/drivers/SpiMaster.h b/src/drivers/SpiMaster.h
index cba140a681f621c3c2219cdd2162ed74c755f699..8b698c57b5a1b6f9635ef6d9808ec29a6131e183 100644
--- a/src/drivers/SpiMaster.h
+++ b/src/drivers/SpiMaster.h
@@ -46,10 +46,7 @@     private:
       void SetupWorkaroundForFtpan58(NRF_SPIM_Type* spim, uint32_t ppi_channel, uint32_t gpiote_channel);
       void DisableWorkaroundForFtpan58(NRF_SPIM_Type* spim, uint32_t ppi_channel, uint32_t gpiote_channel);
       void PrepareTx(const volatile uint32_t bufferAddress, const volatile size_t size);
-      void PrepareRx(const volatile uint32_t cmdAddress,
-                     const volatile size_t cmdSize,
-                     const volatile uint32_t bufferAddress,
-                     const volatile size_t size);
+      void PrepareRx(const volatile uint32_t bufferAddress, const volatile size_t size);
 
       NRF_SPIM_Type* spiBaseAddress;
       uint8_t pinCsn;




diff --git a/src/recoveryLoader.cpp b/src/recoveryLoader.cpp
index ea608a8bbb83219eb41a4a032232974c1c5f02ab..d6f8d49b07d9be64660ead5dcc4f8670770758c9 100644
--- a/src/recoveryLoader.cpp
+++ b/src/recoveryLoader.cpp
@@ -82,7 +82,7 @@ }
 
 uint8_t displayBuffer[displayWidth * bytesPerPixel];
 
-void Process(void* instance) {
+void Process(void* /*instance*/) {
   RefreshWatchdog();
   APP_GPIOTE_INIT(2);