Skip to content

fix the gcc warning when MQTTCLIENT_QOS1 and MQTTCLIENT_QOS2 not defined #195

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions MQTTClient/src/MQTTClient.h
Original file line number Diff line number Diff line change
Expand Up @@ -579,8 +579,10 @@ template<class Network, class Timer, int MAX_MQTT_PACKET_SIZE, int b>
int MQTT::Client<Network, Timer, MAX_MQTT_PACKET_SIZE, b>::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

Expand Down