diff --git a/src/gui/src/IpcClient.cpp b/src/gui/src/IpcClient.cpp index da06ace4..1b0e147a 100644 --- a/src/gui/src/IpcClient.cpp +++ b/src/gui/src/IpcClient.cpp @@ -106,7 +106,7 @@ void IpcClient::sendCommand(const QString& command, ElevateMode const elevate) std::string stdStringCommand = command.toStdString(); const char* charCommand = stdStringCommand.c_str(); - int length = strlen(charCommand); + int length = (int)strlen(charCommand); char lenBuf[4]; intToBytes(length, lenBuf, 4); diff --git a/src/lib/arch/IArchString.cpp b/src/lib/arch/IArchString.cpp index 13e1a83d..f618c125 100644 --- a/src/lib/arch/IArchString.cpp +++ b/src/lib/arch/IArchString.cpp @@ -91,13 +91,14 @@ IArchString::convStringWCToMB(char* dst, } ARCH->unlockMutex(s_mutex); - return len; + return (int)len; } int IArchString::convStringMBToWC(wchar_t* dst, - const char* src, UInt32 n, bool* errors) + const char* src, UInt32 n_param, bool* errors) { + ptrdiff_t n = (ptrdiff_t)n_param; // fix compiler warning ptrdiff_t len = 0; wchar_t dummy; @@ -185,5 +186,5 @@ IArchString::convStringMBToWC(wchar_t* dst, } ARCH->unlockMutex(s_mutex); - return len; + return (int)len; } diff --git a/src/lib/base/Log.cpp b/src/lib/base/Log.cpp index e0ada2f0..823bf6d1 100644 --- a/src/lib/base/Log.cpp +++ b/src/lib/base/Log.cpp @@ -180,7 +180,7 @@ Log::print(const char* file, int line, const char* fmt, ...) sprintf(timestamp, "%04i-%02i-%02iT%02i:%02i:%02i", tm->tm_year + 1900, tm->tm_mon+1, tm->tm_mday, tm->tm_hour, tm->tm_min, tm->tm_sec); // square brackets, spaces, comma and null terminator take about 10 - int size = 10; + size_t size = 10; size += strlen(timestamp); size += strlen(g_priority[priority]); size += strlen(buffer); diff --git a/src/lib/net/TCPSocket.cpp b/src/lib/net/TCPSocket.cpp index fbb40587..18666f3d 100644 --- a/src/lib/net/TCPSocket.cpp +++ b/src/lib/net/TCPSocket.cpp @@ -337,7 +337,7 @@ TCPSocket::doRead() // slurp up as much as possible do { - m_inputBuffer.write(buffer, bytesRead); + m_inputBuffer.write(buffer, (UInt32)bytesRead); bytesRead = ARCH->readSocket(m_socket, buffer, sizeof(buffer)); } while (bytesRead > 0);