From d8b24adef7bba9ac9c7f64817238a19dbd75184c Mon Sep 17 00:00:00 2001 From: hsaturn Date: Sat, 3 Dec 2022 20:25:03 +0100 Subject: [PATCH] [MqttClient] Fix compilation warnings --- src/TinyMqtt.cpp | 7 +++---- src/TinyMqtt.h | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/TinyMqtt.cpp b/src/TinyMqtt.cpp index 5768387..739202e 100644 --- a/src/TinyMqtt.cpp +++ b/src/TinyMqtt.cpp @@ -2,7 +2,6 @@ #include #ifdef TINY_MQTT_DEBUG -static auto green = TinyConsole::green; static auto cyan = TinyConsole::cyan; static auto white = TinyConsole::white; static auto red = TinyConsole::red; @@ -269,7 +268,7 @@ void MqttClient::clientAlive(uint32_t more_seconds) if (keep_alive) { #ifdef EPOXY_DUINO - alive=millis()+500000; + alive=millis()+500000+0*more_seconds; #else alive=millis()+1000*(keep_alive+more_seconds); #endif @@ -901,9 +900,9 @@ void MqttMessage::hexdump(const char* prefix) const t=tts[typ]; Console.fg(cyan); #ifdef NOT_ESP_CORE - Console << "---> MESSAGE " << t << ' ' << _HEX(typ) << ' ' << (Complete ? "complete" : "uncomplete") << " mem=???" << endl; + Console << "---> MESSAGE " << t << ' ' << _HEX(typ) << ' ' << " mem=???" << endl; #else - Console << "---> MESSAGE " << t << ' ' << _HEX(typ) << ' ' << (Complete ? "complete" : "uncomplete") << " mem=" << ESP.getFreeHeap() << endl; + Console << "---> MESSAGE " << t << ' ' << _HEX(typ) << ' ' << " mem=" << ESP.getFreeHeap() << endl; #endif Console.fg(white); diff --git a/src/TinyMqtt.h b/src/TinyMqtt.h index 275eedd..f96f9fc 100644 --- a/src/TinyMqtt.h +++ b/src/TinyMqtt.h @@ -93,6 +93,7 @@ class MqttMessage PingResp = 0xD0, Disconnect = 0xE0 }; + enum __attribute__((packed)) State { FixedHeader=0,