From 72901486ba39f8f4df9d0386b0521b711ef374a2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Travert?= <asmodai27@users.noreply.github.com> Date: Sun, 26 Jun 2022 18:59:46 +0200 Subject: Avoid implicit conversion from int to char --- googlemock/src/gmock-internal-utils.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googlemock/src/gmock-internal-utils.cc b/googlemock/src/gmock-internal-utils.cc index 0a74841..2d7c5c4 100644 --- a/googlemock/src/gmock-internal-utils.cc +++ b/googlemock/src/gmock-internal-utils.cc @@ -201,7 +201,7 @@ GTEST_API_ void IllegalDoDefault(const char* file, int line) { constexpr char UnBase64Impl(char c, const char* const base64, char carry) { return *base64 == 0 ? static_cast<char>(65) : *base64 == c ? carry - : UnBase64Impl(c, base64 + 1, carry + 1); + : UnBase64Impl(c, base64 + 1, static_cast<char>(carry + 1)); } template <size_t... I> -- cgit v0.12 From 5eaa1139038076ed9bc029ab6518844a1b03ea7f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Travert?= <asmodai27@users.noreply.github.com> Date: Sun, 26 Jun 2022 19:01:00 +0200 Subject: Avoid implicit conversion from int to char --- googletest/src/gtest-printers.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/googletest/src/gtest-printers.cc b/googletest/src/gtest-printers.cc index f3976d2..d475ad3 100644 --- a/googletest/src/gtest-printers.cc +++ b/googletest/src/gtest-printers.cc @@ -315,7 +315,7 @@ void PrintTo(__uint128_t v, ::std::ostream* os) { low = low / 10 + high_mod * 1844674407370955161 + carry / 10; char digit = static_cast<char>(carry % 10); - *--p = '0' + digit; + *--p = static_cast<char>('0' + digit); } *os << p; } -- cgit v0.12