From 71966b6e5a940c99e44129efb4129884a0723c22 Mon Sep 17 00:00:00 2001 From: Alon Nof Date: Mon, 17 Dec 2018 12:38:42 +0200 Subject: [PATCH] remove warning: comparison of an unsigned value (#13) remove compile warning: comparison of an unsigned value is always true --- features/minimal-printf/mbed_printf_implementation.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/features/minimal-printf/mbed_printf_implementation.c b/features/minimal-printf/mbed_printf_implementation.c index 4b8cd1a4ac..eca418ae17 100644 --- a/features/minimal-printf/mbed_printf_implementation.c +++ b/features/minimal-printf/mbed_printf_implementation.c @@ -436,7 +436,7 @@ int mbed_minimal_formatted_string(char* buffer, size_t length, const char* forma /* ensure that function wasn't called with an empty buffer, or with or with a buffer size that is larger than the maximum 'int' value, or with a NULL format specifier */ - if (format && length >= 0 && length <= INT_MAX) + if (format && length <= INT_MAX) { /* Make sure that there's always space for the NULL terminator */ if (length > 0)