From 1997ab63fb66a55341de0311e1b309419a32d724 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 31 Dec 2018 11:48:42 -0500 Subject: Fix various warnings and conversion issues --- src/string.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/string.c') diff --git a/src/string.c b/src/string.c index b465bf8d..1b106841 100644 --- a/src/string.c +++ b/src/string.c @@ -117,16 +117,16 @@ serd_strtod(const char* str, size_t* end) { double result = 0.0; -#define SET_END(index) do { if (end) { *end = index; } } while (0) +#define SET_END(index) do { if (end) { *end = (size_t)(index); } } while (0) if (!strcmp(str, "NaN")) { - SET_END(3); + SET_END(3u); return NAN; } else if (!strcmp(str, "-INF")) { - SET_END(4); + SET_END(4u); return -INFINITY; } else if (!strcmp(str, "INF")) { - SET_END(3); + SET_END(3u); return INFINITY; } -- cgit v1.2.1