From 277aa259fcfa3fb4f6a92c6d8832453ae693b869 Mon Sep 17 00:00:00 2001 From: Marco Paland Date: Fri, 11 May 2018 13:18:15 +0200 Subject: fix(printf,test_suite): fix compiler warnings --- test/test_suite.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'test') diff --git a/test/test_suite.cpp b/test/test_suite.cpp index 21eb13f..c801c5f 100644 --- a/test/test_suite.cpp +++ b/test/test_suite.cpp @@ -894,7 +894,7 @@ TEST_CASE("float", "[]" ) { test::sprintf(buffer, "%.1f", 42.5); REQUIRE(!strcmp(buffer, "42.5")); - test::sprintf(buffer, "%f", (float)42167); + test::sprintf(buffer, "%f", 42167.0); REQUIRE(!strcmp(buffer, "42167.000000")); test::sprintf(buffer, "%.9f", -12345.987654321); @@ -1069,7 +1069,7 @@ TEST_CASE("buffer length", "[]" ) { REQUIRE(buffer[0] == (char)0xA5); REQUIRE(ret == 4); - buffer[0] = 0xCC; + buffer[0] = (char)0xCC; test::snprintf(buffer, 1, "%s", "Test"); REQUIRE(buffer[0] == '\0'); -- cgit v1.2.3