diff --git a/Source/msg.cpp b/Source/msg.cpp index 887557432..e8ff1ec1a 100644 --- a/Source/msg.cpp +++ b/Source/msg.cpp @@ -770,7 +770,7 @@ void DeltaImportData(_cmd_id cmd, uint32_t recvOffset, int pnum) #ifdef USE_PKWARE if (sgRecvBuf[0] != std::byte { 0 }) { - deltaSize = PkwareDecompress(&sgRecvBuf[1], deltaSize, sizeof(sgRecvBuf) - 1); + deltaSize = PkwareDecompress(&sgRecvBuf[1], static_cast(deltaSize), sizeof(sgRecvBuf) - 1); if (deltaSize == 0) { Log("PKWare decompression failure, dropping player {}", pnum); SNetDropPlayer(pnum, LEAVE_DROP); @@ -3303,7 +3303,7 @@ bool ValidateCmdSize(size_t requiredCmdSize, size_t maxCmdSize, size_t playerId) return true; Log("Suspiciously small packet size, dropping player {}", playerId); - SNetDropPlayer(playerId, LEAVE_DROP); + SNetDropPlayer(static_cast(playerId), LEAVE_DROP); return false; } diff --git a/test/text_render_integration_test.cpp b/test/text_render_integration_test.cpp index 6826834a7..06f8857e5 100644 --- a/test/text_render_integration_test.cpp +++ b/test/text_render_integration_test.cpp @@ -226,7 +226,7 @@ std::vector ReadFile(const std::string &path) SDL_RWops *rwops = SDL_RWFromFile(path.c_str(), "rb"); std::vector result; if (rwops == nullptr) return result; - const size_t size = SDL_RWsize(rwops); + const size_t size = static_cast(SDL_RWsize(rwops)); result.resize(size); SDL_RWread(rwops, result.data(), size, 1); SDL_RWclose(rwops); diff --git a/test/vision_test.cpp b/test/vision_test.cpp index 8a6372e05..02a5f830b 100644 --- a/test/vision_test.cpp +++ b/test/vision_test.cpp @@ -86,7 +86,11 @@ void dumpVisibleEnv() } sz += snprintf(buf + sz, sizeof(buf) - sz, "\n"); } +#ifdef _WIN32 + _write(2, buf, sz); +#else write(2, buf, sz); +#endif } // This test case checks the visibility of surrounding objects