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)