From 83f6d7d81b80809de0bc850a0b445bc035098dba Mon Sep 17 00:00:00 2001 From: JF Date: Mon, 17 Aug 2020 16:31:00 +0200 Subject: Fix most of the warnings. Remaining warnings come from nimble source code. --- src/Components/Ble/AlertNotificationService.cpp | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) (limited to 'src/Components/Ble/AlertNotificationService.cpp') diff --git a/src/Components/Ble/AlertNotificationService.cpp b/src/Components/Ble/AlertNotificationService.cpp index 0faa17c8..ce2f7dd7 100644 --- a/src/Components/Ble/AlertNotificationService.cpp +++ b/src/Components/Ble/AlertNotificationService.cpp @@ -26,8 +26,8 @@ void AlertNotificationService::Init() { ASSERT(res == 0); } -AlertNotificationService::AlertNotificationService ( Pinetime::System::SystemTask& systemTask, Pinetime::Controllers::NotificationManager& notificationManager ) : m_systemTask{systemTask}, m_notificationManager{notificationManager}, - characteristicDefinition{ +AlertNotificationService::AlertNotificationService ( System::SystemTask& systemTask, NotificationManager& notificationManager ) + : characteristicDefinition{ { .uuid = (ble_uuid_t *) &ansCharUuid, .access_cb = AlertNotificationCallback, @@ -48,8 +48,7 @@ AlertNotificationService::AlertNotificationService ( Pinetime::System::SystemTas { 0 }, - } -{ + }, m_systemTask{systemTask}, m_notificationManager{notificationManager} { } int AlertNotificationService::OnAlert(uint16_t conn_handle, uint16_t attr_handle, @@ -67,7 +66,7 @@ int AlertNotificationService::OnAlert(uint16_t conn_handle, uint16_t attr_handle char *s = (char *) &data[3]; auto messageSize = min(maxMessageSize, (bufferSize-3)); - for (int i = 0; i < messageSize-1; i++) { + for (uint i = 0; i < messageSize-1; i++) { if (s[i] == 0x00) { s[i] = 0x0A; } -- cgit v1.2.3