-
Notifications
You must be signed in to change notification settings - Fork 19
Update to prevent some compiler warnings #4
Update to prevent some compiler warnings #4
Conversation
src/lib/mqtt.cpp
Outdated
@@ -15,7 +15,7 @@ MQTT::MQTT(ESP *esp8266) | |||
boolean MQTT::begin(const char* client_id, const char* user, const char* pass, uint16_t keep_alive, boolean clean_seasion) | |||
{ | |||
uint16_t crc; | |||
uint32_t wait, cb_data; | |||
uint32_t /*wait,*/ cb_data; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is wait unused everywhere or only in this implementation?
src/lib/CiaoData.h
Outdated
return msg_split[index]; | ||
} | ||
|
||
bool isEmpty(){ | ||
//if (atoi( get(1) ) > 0) | ||
if (get(2) != "") | ||
//if (get(2) != "") | ||
if ( strcmp(get(2), "") != 0) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
strcmp
is unsafe, it's better if you use strncmp
(or something even easier, based on what is the expected result of get(2)
)
src/UnoWiFiDevEd.h
Outdated
@@ -30,11 +30,31 @@ class ArduinoWifiClass : public WifiData | |||
|
|||
class CiaoClass : public WifiData | |||
{ | |||
private: | |||
const char* DEF_DATA = ""; | |||
const char* DEF_METH = "GET"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are these strings hidden as defines really needed?
@@ -239,8 +224,13 @@ CiaoData PassThroughWrite(char* connector,char* hostname, String data, char* met | |||
ciao_data.msg_split[2]="Protocol Error"; | |||
return ciao_data; | |||
} | |||
} | |||
|
|||
CiaoData PassThroughWrite(const char* connector, const char* hostname, String data, const char* method){ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 for this rewrite
upd: update examples upd: code review
ba54c7f
to
9e81558
Compare
No description provided.