[MqttClient] Fix compilation warnings

This commit is contained in:
hsaturn
2022-12-03 20:25:03 +01:00
parent 4726ff293c
commit d8b24adef7
2 changed files with 4 additions and 4 deletions

View File

@@ -2,7 +2,6 @@
#include <sstream> #include <sstream>
#ifdef TINY_MQTT_DEBUG #ifdef TINY_MQTT_DEBUG
static auto green = TinyConsole::green;
static auto cyan = TinyConsole::cyan; static auto cyan = TinyConsole::cyan;
static auto white = TinyConsole::white; static auto white = TinyConsole::white;
static auto red = TinyConsole::red; static auto red = TinyConsole::red;
@@ -269,7 +268,7 @@ void MqttClient::clientAlive(uint32_t more_seconds)
if (keep_alive) if (keep_alive)
{ {
#ifdef EPOXY_DUINO #ifdef EPOXY_DUINO
alive=millis()+500000; alive=millis()+500000+0*more_seconds;
#else #else
alive=millis()+1000*(keep_alive+more_seconds); alive=millis()+1000*(keep_alive+more_seconds);
#endif #endif
@@ -901,9 +900,9 @@ void MqttMessage::hexdump(const char* prefix) const
t=tts[typ]; t=tts[typ];
Console.fg(cyan); Console.fg(cyan);
#ifdef NOT_ESP_CORE #ifdef NOT_ESP_CORE
Console << "---> MESSAGE " << t << ' ' << _HEX(typ) << ' ' << (Complete ? "complete" : "uncomplete") << " mem=???" << endl; Console << "---> MESSAGE " << t << ' ' << _HEX(typ) << ' ' << " mem=???" << endl;
#else #else
Console << "---> MESSAGE " << t << ' ' << _HEX(typ) << ' ' << (Complete ? "complete" : "uncomplete") << " mem=" << ESP.getFreeHeap() << endl; Console << "---> MESSAGE " << t << ' ' << _HEX(typ) << ' ' << " mem=" << ESP.getFreeHeap() << endl;
#endif #endif
Console.fg(white); Console.fg(white);

View File

@@ -93,6 +93,7 @@ class MqttMessage
PingResp = 0xD0, PingResp = 0xD0,
Disconnect = 0xE0 Disconnect = 0xE0
}; };
enum __attribute__((packed)) State enum __attribute__((packed)) State
{ {
FixedHeader=0, FixedHeader=0,