diff options
author | Marco Paland <marco@paland.com> | 2018-05-11 13:18:15 +0200 |
---|---|---|
committer | Marco Paland <marco@paland.com> | 2018-05-11 13:18:15 +0200 |
commit | 277aa259fcfa3fb4f6a92c6d8832453ae693b869 (patch) | |
tree | 850155ddc49b10ced712d744dd756bd92bd21a97 /test | |
parent | bb5a8af50748b8846ce6d29063ef0747ca4cff86 (diff) | |
download | printf-277aa259fcfa3fb4f6a92c6d8832453ae693b869.tar.gz printf-277aa259fcfa3fb4f6a92c6d8832453ae693b869.tar.bz2 printf-277aa259fcfa3fb4f6a92c6d8832453ae693b869.zip |
fix(printf,test_suite): fix compiler warnings
Diffstat (limited to 'test')
-rw-r--r-- | test/test_suite.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
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');
|