From ca9f5a18d49e1af573b60dce7add08dd70091e7a Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Fri, 27 May 2022 02:29:17 +0800 Subject: [PATCH] Suppress type narrowing warnings --- src/app/signalhandler.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/app/signalhandler.cpp b/src/app/signalhandler.cpp index 841cc4c7c..9eb49e379 100644 --- a/src/app/signalhandler.cpp +++ b/src/app/signalhandler.cpp @@ -76,8 +76,8 @@ namespace { const size_t strLen = strlen(str); #ifdef Q_OS_WIN - if (_write(_fileno(stderr), str, strLen) < static_cast(strLen)) - std::ignore = _write(_fileno(stdout), str, strLen); + if (_write(_fileno(stderr), str, static_cast(strLen)) < static_cast(strLen)) + std::ignore = _write(_fileno(stdout), str, static_cast(strLen)); #else if (write(STDERR_FILENO, str, strLen) < static_cast(strLen)) std::ignore = write(STDOUT_FILENO, str, strLen);