From 5ce3bce49c3d855e69686de77d8118948731b7f6 Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Thu, 21 May 2020 06:28:03 +0200 Subject: [PATCH 1/3] Fix compiler warning: comparison between signed... ... and unsigned integer expressions [-Wsign-compare] --- DHT.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/DHT.cpp b/DHT.cpp index 91393c7..efcd98c 100644 --- a/DHT.cpp +++ b/DHT.cpp @@ -26,7 +26,7 @@ #include "DHT.h" #define MIN_INTERVAL 2000 /**< min interval value */ -#define TIMEOUT -1 /**< timeout on */ +#define TIMEOUT UINT32_MAX /**< Used programmatically for timeout. Not a timeout duration. Type: uint32_t. */ /*! * @brief Instantiates a new DHT class From 7528a843ddde3b0ee47f354f860be42c1a88175b Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Thu, 21 May 2020 14:21:00 +0200 Subject: [PATCH 2/3] Fix compiler warning: comparison between signed... ... and unsigned integer expressions [-Wsign-compare] --- DHT.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/DHT.cpp b/DHT.cpp index efcd98c..0c22036 100644 --- a/DHT.cpp +++ b/DHT.cpp @@ -26,7 +26,8 @@ #include "DHT.h" #define MIN_INTERVAL 2000 /**< min interval value */ -#define TIMEOUT UINT32_MAX /**< Used programmatically for timeout. Not a timeout duration. Type: uint32_t. */ +#define TIMEOUT UINT32_MAX /**< Used programmatically for timeout. \ + Not a timeout duration. Type: uint32_t. */ /*! * @brief Instantiates a new DHT class From d0a10359855d6a3cc1bb25f2a898d14d2879d9ad Mon Sep 17 00:00:00 2001 From: Rotzbua Date: Thu, 21 May 2020 14:29:08 +0200 Subject: [PATCH 3/3] Fix compiler warning: comparison between signed... ... and unsigned integer expressions [-Wsign-compare] --- DHT.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/DHT.cpp b/DHT.cpp index 0c22036..94fe4cf 100644 --- a/DHT.cpp +++ b/DHT.cpp @@ -26,8 +26,9 @@ #include "DHT.h" #define MIN_INTERVAL 2000 /**< min interval value */ -#define TIMEOUT UINT32_MAX /**< Used programmatically for timeout. \ - Not a timeout duration. Type: uint32_t. */ +#define TIMEOUT \ + UINT32_MAX /**< Used programmatically for timeout. \ + Not a timeout duration. Type: uint32_t. */ /*! * @brief Instantiates a new DHT class