1
0
mirror of https://github.com/d47081/qBittorrent.git synced 2025-01-23 04:54:18 +00:00

Suppress type narrowing warnings

This commit is contained in:
Chocobo1 2022-05-27 02:29:17 +08:00
parent 2c9e1d942b
commit ca9f5a18d4
No known key found for this signature in database
GPG Key ID: 210D9C873253A68C

View File

@ -76,8 +76,8 @@ namespace
{ {
const size_t strLen = strlen(str); const size_t strLen = strlen(str);
#ifdef Q_OS_WIN #ifdef Q_OS_WIN
if (_write(_fileno(stderr), str, strLen) < static_cast<int>(strLen)) if (_write(_fileno(stderr), str, static_cast<unsigned int>(strLen)) < static_cast<int>(strLen))
std::ignore = _write(_fileno(stdout), str, strLen); std::ignore = _write(_fileno(stdout), str, static_cast<unsigned int>(strLen));
#else #else
if (write(STDERR_FILENO, str, strLen) < static_cast<ssize_t>(strLen)) if (write(STDERR_FILENO, str, strLen) < static_cast<ssize_t>(strLen))
std::ignore = write(STDOUT_FILENO, str, strLen); std::ignore = write(STDOUT_FILENO, str, strLen);