From 706659a97f9d46a8ca617ad9a7bf03b1009e2a62 Mon Sep 17 00:00:00 2001 From: Daniela Engert Date: Sat, 16 Dec 2017 10:40:49 +0100 Subject: [PATCH] std::basic_string::size() may return a size_type which is wider than an int. Signed-off-by: Daniela Engert --- include/boost/system/detail/error_code.ipp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/boost/system/detail/error_code.ipp b/include/boost/system/detail/error_code.ipp index a2b3f11..b712de7 100644 --- a/include/boost/system/detail/error_code.ipp +++ b/include/boost/system/detail/error_code.ipp @@ -410,7 +410,7 @@ namespace } } - int num_chars = (buf.size() + 1) * 2; + int num_chars = static_cast(buf.size() + 1) * 2; boost::winapi::LPSTR_ narrow_buffer = #if defined(__GNUC__)