From 35864a52c3e72c719586f14d75f9dc555888e8fe Mon Sep 17 00:00:00 2001 From: proddy Date: Thu, 24 Sep 2020 21:21:49 +0200 Subject: [PATCH] fix lint warning with osx xcode compiler --- lib_standalone/Arduino.h | 2 ++ src/command.cpp | 3 +-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/lib_standalone/Arduino.h b/lib_standalone/Arduino.h index fbefdc5f7..e8884db05 100644 --- a/lib_standalone/Arduino.h +++ b/lib_standalone/Arduino.h @@ -39,7 +39,9 @@ #define LOW 0 #define HIGH 1 +#ifndef NAN #define NAN 0 +#endif #define INPUT 0 #define OUTPUT 1 diff --git a/src/command.cpp b/src/command.cpp index 8f985e098..10f07226c 100644 --- a/src/command.cpp +++ b/src/command.cpp @@ -44,9 +44,8 @@ bool Command::call(const uint8_t device_type, const char * cmd, const char * val if (!cmdfunctions_.empty()) { for (const auto & cf : cmdfunctions_) { 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 - if (strcmp(cf_cmd, cmd) == 0) { + if (uuid::read_flash_string(cf.cmd_) == cmd) { if (cf.cmdfunction_json_) { // check if json object is empty, if so quit if (output.isNull()) {