From 13611a98a8bbcf64792f9f33e6cc0daf88a22f00 Mon Sep 17 00:00:00 2001 From: Wiebe Cazemier Date: Sat, 23 Apr 2022 13:45:09 +0200 Subject: [PATCH] Quiet warnings about not (yet) used variables --- mqttpacket.cpp | 2 ++ utils.h | 2 ++ 2 files changed, 4 insertions(+), 0 deletions(-) diff --git a/mqttpacket.cpp b/mqttpacket.cpp index 82b29b3..1bdac97 100644 --- a/mqttpacket.cpp +++ b/mqttpacket.cpp @@ -400,9 +400,11 @@ void MqttPacket::handleConnect() break; case Mqtt5Properties::RequestResponseInformation: request_response_information = !!readByte(); + UNUSED(request_response_information); break; case Mqtt5Properties::RequestProblemInformation: request_problem_information = !!readByte(); + UNUSED(request_problem_information); break; case Mqtt5Properties::UserProperty: readUserProperty(); diff --git a/utils.h b/utils.h index f99b34a..ddc68bc 100644 --- a/utils.h +++ b/utils.h @@ -35,6 +35,8 @@ License along with FlashMQ. If not, see . #include "bindaddr.h" #include "types.h" +#define UNUSED(expr) do { (void)(expr); } while (0) + template int check(int rc) { if (rc < 0) -- libgit2 0.21.4