Static cast size in additon

Signed-off-by: Sara Damiano <sdamiano@stroudcenter.org>
This commit is contained in:
Sara Damiano
2020-05-05 12:26:22 -04:00
parent feae2e4f94
commit 56446bc42f
5 changed files with 6 additions and 6 deletions

View File

@@ -10,7 +10,7 @@
#define SRC_TINYGSMCOMMON_H_
// The current library version number
#define TINYGSM_VERSION "0.10.5"
#define TINYGSM_VERSION "0.10.6"
#if defined(SPARK) || defined(PARTICLE)
#include "Particle.h"

View File

@@ -133,7 +133,7 @@ class TinyGsmTCP {
// Returns the combined number of characters available in the TinyGSM
// fifo and the modem chips internal fifo.
if (!rx.size()) { at->maintain(); }
return rx.size() + sock_available;
return static_cast<uint16_t>(rx.size()) + sock_available;
#elif defined TINY_GSM_BUFFER_READ_AND_CHECK_SIZE
// Returns the combined number of characters available in the TinyGSM
@@ -146,7 +146,7 @@ class TinyGsmTCP {
}
at->maintain();
}
return rx.size() + sock_available;
return static_cast<uint16_t>(rx.size()) + sock_available;
#else
#error Modem client has been incorrectly created