From 67152be20966b20364e6b7e6404a1d11c24a2eb6 Mon Sep 17 00:00:00 2001 From: Bruno Iljazovic Date: Wed, 27 Nov 2024 14:52:50 +0100 Subject: [PATCH] fix warnings Reviewers: korina Reviewed By: korina Subscribers: miljen Differential Revision: https://repo.mireo.local/D32452 --- include/async_mqtt5/detail/topic_validation.hpp | 4 ++-- include/async_mqtt5/impl/async_sender.hpp | 4 ++-- include/async_mqtt5/impl/sentry_op.hpp | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/async_mqtt5/detail/topic_validation.hpp b/include/async_mqtt5/detail/topic_validation.hpp index 79d934c..6dcbb9e 100644 --- a/include/async_mqtt5/detail/topic_validation.hpp +++ b/include/async_mqtt5/detail/topic_validation.hpp @@ -15,8 +15,8 @@ namespace async_mqtt5::detail { -static constexpr uint32_t min_subscription_identifier = 1; -static constexpr uint32_t max_subscription_identifier = 268'435'455; +static constexpr int32_t min_subscription_identifier = 1; +static constexpr int32_t max_subscription_identifier = 268'435'455; static constexpr std::string_view shared_sub_prefix = "$share/"; diff --git a/include/async_mqtt5/impl/async_sender.hpp b/include/async_mqtt5/impl/async_sender.hpp index b669c9a..32b36a3 100644 --- a/include/async_mqtt5/impl/async_sender.hpp +++ b/include/async_mqtt5/impl/async_sender.hpp @@ -95,9 +95,9 @@ public: auto s2 = other._serial_num; if (s1 < s2) - return (s2 - s1) < (1 << (SERIAL_BITS - 1)); + return (s2 - s1) < (1u << (SERIAL_BITS - 1)); - return (s1 - s2) >= (1 << (SERIAL_BITS - 1)); + return (s1 - s2) >= (1u << (SERIAL_BITS - 1)); } private: diff --git a/include/async_mqtt5/impl/sentry_op.hpp b/include/async_mqtt5/impl/sentry_op.hpp index 228e12d..bbd50b9 100644 --- a/include/async_mqtt5/impl/sentry_op.hpp +++ b/include/async_mqtt5/impl/sentry_op.hpp @@ -63,7 +63,7 @@ public: ); } - void operator()(on_timer, error_code ec) { + void operator()(on_timer, error_code) { if (!_svc_ptr->is_open()) return complete();