fix lint warning with osx xcode compiler

This commit is contained in:
proddy
2020-09-24 21:21:49 +02:00
parent fb5851414f
commit 35864a52c3
2 changed files with 3 additions and 2 deletions

View File

@@ -39,7 +39,9 @@
#define LOW 0 #define LOW 0
#define HIGH 1 #define HIGH 1
#ifndef NAN
#define NAN 0 #define NAN 0
#endif
#define INPUT 0 #define INPUT 0
#define OUTPUT 1 #define OUTPUT 1

View File

@@ -44,9 +44,8 @@ bool Command::call(const uint8_t device_type, const char * cmd, const char * val
if (!cmdfunctions_.empty()) { if (!cmdfunctions_.empty()) {
for (const auto & cf : cmdfunctions_) { for (const auto & cf : cmdfunctions_) {
if (cf.device_type_ == device_type) { if (cf.device_type_ == device_type) {
const char * cf_cmd = uuid::read_flash_string(cf.cmd_).c_str();
// find a matching command and call it // find a matching command and call it
if (strcmp(cf_cmd, cmd) == 0) { if (uuid::read_flash_string(cf.cmd_) == cmd) {
if (cf.cmdfunction_json_) { if (cf.cmdfunction_json_) {
// check if json object is empty, if so quit // check if json object is empty, if so quit
if (output.isNull()) { if (output.isNull()) {