From bdf30834ebe352310f31bb16382484f828ccbf0b Mon Sep 17 00:00:00 2001 From: Teskann <47865674+Teskann@users.noreply.github.com> Date: Sat, 8 Oct 2022 23:12:21 +0200 Subject: [PATCH] Mute the sign conversion warning with explicit cast --- src/catch2/catch_tostring.hpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/catch2/catch_tostring.hpp b/src/catch2/catch_tostring.hpp index 65c6c13eeb..8ff236e4e8 100644 --- a/src/catch2/catch_tostring.hpp +++ b/src/catch2/catch_tostring.hpp @@ -43,7 +43,7 @@ namespace Catch { inline std::size_t catch_strnlen(const char *str, std::size_t n) { auto ret = std::char_traits::find(str, n, '\0'); if (ret != nullptr) { - return ret - str; + return static_cast(ret - str); } return n; }