From 865a5045424bb542c7fe1e8ff68385cf1570d9ce Mon Sep 17 00:00:00 2001 From: Mirela Chirica Date: Mon, 30 Sep 2019 14:01:05 +0300 Subject: [PATCH 1/2] Cellular: Include of errno.h needed for Mac OS X --- features/cellular/framework/AT/ATHandler.cpp | 1 + 1 file changed, 1 insertion(+) diff --git a/features/cellular/framework/AT/ATHandler.cpp b/features/cellular/framework/AT/ATHandler.cpp index 295967691b..540f12577c 100644 --- a/features/cellular/framework/AT/ATHandler.cpp +++ b/features/cellular/framework/AT/ATHandler.cpp @@ -18,6 +18,7 @@ #include #include #include +#include #include "ATHandler.h" #include "mbed_poll.h" #include "FileHandle.h" From 0860f3e0f66184c11b952d9c9f29db90d768b666 Mon Sep 17 00:00:00 2001 From: Mirela Chirica Date: Mon, 30 Sep 2019 14:04:58 +0300 Subject: [PATCH 2/2] Cellular: Removed not used variable --- features/cellular/framework/AT/ATHandler.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/features/cellular/framework/AT/ATHandler.cpp b/features/cellular/framework/AT/ATHandler.cpp index 540f12577c..9b35a37b8f 100644 --- a/features/cellular/framework/AT/ATHandler.cpp +++ b/features/cellular/framework/AT/ATHandler.cpp @@ -749,8 +749,7 @@ int32_t ATHandler::read_int() } errno = 0; - char *endptr; - long result = std::strtol(buff, &endptr, 10); + long result = std::strtol(buff, NULL, 10); if ((result == LONG_MIN || result == LONG_MAX) && errno == ERANGE) { return -1; // overflow/underflow }