diff --git a/MQTTClient/src/MQTTClient.h b/MQTTClient/src/MQTTClient.h index 65dc4d72..823372cb 100644 --- a/MQTTClient/src/MQTTClient.h +++ b/MQTTClient/src/MQTTClient.h @@ -579,8 +579,10 @@ template int MQTT::Client::cycle(Timer& timer) { // get one piece of work off the wire and one pass through - int len = 0, - rc = SUCCESS; +#if MQTTCLIENT_QOS1 || MQTTCLIENT_QOS2 + int len = 0; +# endif + int rc = SUCCESS; int packet_type = readPacket(timer); // read the socket, see what work is due