From f8a13112b672961292b1a2c1f97b38c6b9b67c09 Mon Sep 17 00:00:00 2001 From: Pim van Pelt Date: Sun, 4 Nov 2018 16:22:09 +0100 Subject: [PATCH] Fix signedness comparison for ESP8266 compiler --- src/timespec.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/timespec.c b/src/timespec.c index 953b15a..a4b2ea6 100644 --- a/src/timespec.c +++ b/src/timespec.c @@ -240,7 +240,7 @@ bool timespec_get_spec(struct mgos_timespec *ts, char *ret, int retlen) { snprintf(spec_str, sizeof(spec_str) - 1, "%02d:%02d:%02d-%02d:%02d:%02d", t_spec->start_h, t_spec->start_m, t_spec->start_s, t_spec->stop_h, t_spec->stop_m, t_spec->stop_s); - if (strlen(spec_str) + strlen(ret) > retlen - 1) { + if ((int) (strlen(spec_str) + strlen(ret)) > retlen - 1) { return false; } if (strlen(ret) > 0) {