From 675aba89e415a60d4f28cfa8f5bafadb1308f746 Mon Sep 17 00:00:00 2001 From: Mathieu Carbou Date: Wed, 4 Sep 2024 13:06:21 +0200 Subject: [PATCH] Updated to ack(size_t len, uint32_t time = 0); --- src/AsyncEventSource.cpp | 3 +-- src/AsyncEventSource.h | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/src/AsyncEventSource.cpp b/src/AsyncEventSource.cpp index 30ad271..e09c058 100644 --- a/src/AsyncEventSource.cpp +++ b/src/AsyncEventSource.cpp @@ -128,8 +128,7 @@ AsyncEventSourceMessage::~AsyncEventSourceMessage() { free(_data); } -size_t AsyncEventSourceMessage::ack(size_t len, uint32_t time) { - (void)time; +size_t AsyncEventSourceMessage::ack(size_t len, __attribute__((unused)) uint32_t time) { // If the whole message is now acked... if (_acked + len > _len) { // Return the number of extra bytes acked (they will be carried on to the next message) diff --git a/src/AsyncEventSource.h b/src/AsyncEventSource.h index df28d21..986f83a 100644 --- a/src/AsyncEventSource.h +++ b/src/AsyncEventSource.h @@ -66,7 +66,7 @@ class AsyncEventSourceMessage { public: AsyncEventSourceMessage(const char* data, size_t len); ~AsyncEventSourceMessage(); - size_t ack(size_t len, uint32_t time __attribute__((unused))); + size_t ack(size_t len, uint32_t time = 0); size_t send(AsyncClient* client); bool finished() { return _acked == _len; } bool sent() { return _sent == _len; }