diff --git a/CMakeLists.txt b/CMakeLists.txt index 0cb88702..c5f4de9f 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -114,8 +114,8 @@ else() endif() if(MSVC) - add_definitions(-D_CRT_SECURE_NO_WARNINGS) - add_definitions(-D_SCL_SECURE_NO_WARNINGS) + add_definitions(-D_CRT_SECURE_NO_DEPRECATE) + add_definitions(-D_SCL_SECURE_NO_DEPRECATE) endif(MSVC) #TODO: Make the OpenSSL includes less promiscuous so this isn't needed diff --git a/Sources/Plasma/CoreLib/plFileSystem.h b/Sources/Plasma/CoreLib/plFileSystem.h index 317e8a03..c0b3b1ba 100644 --- a/Sources/Plasma/CoreLib/plFileSystem.h +++ b/Sources/Plasma/CoreLib/plFileSystem.h @@ -259,10 +259,10 @@ public: uint64_t ModifyTime() const { return fModifyTime; } /** Returns \p true if this file is a directory. */ - bool IsDirectory() const { return (fFlags & kIsDirectory); } + bool IsDirectory() const { return (fFlags & kIsDirectory) != 0; } /** Returns \p true if this file is a regular file. */ - bool IsFile() const { return (fFlags & kIsNormalFile); } + bool IsFile() const { return (fFlags & kIsNormalFile) != 0; } private: plFileName fName; diff --git a/Sources/Plasma/CoreLib/plString.h b/Sources/Plasma/CoreLib/plString.h index daa7bd90..f0f30fbb 100644 --- a/Sources/Plasma/CoreLib/plString.h +++ b/Sources/Plasma/CoreLib/plString.h @@ -66,6 +66,8 @@ typedef unsigned int UniChar; # define wcsicmp _wcsicmp # define wcsnicmp _wcsnicmp # define strlwr _strlwr +# define strdup _strdup +# define wcsdup _wcsdup #else # define stricmp strcasecmp # define strnicmp strncasecmp diff --git a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Dns.cpp b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Dns.cpp index ab63ae88..ce0a9027 100644 --- a/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Dns.cpp +++ b/Sources/Plasma/NucleusLib/pnAsyncCoreExe/Private/Win32/pnAceW32Dns.cpp @@ -273,11 +273,12 @@ void AsyncAddressLookupName ( // Get name/port char* ansiName = strdup(name); - if (char* portStr = StrChr(ansiName, ':')) { - if (unsigned newPort = StrToUnsigned(portStr + 1, nil, 10)) + if (char* portStr = strchr(ansiName, ':')) { + if (unsigned long newPort = strtoul(portStr + 1, nullptr, 10)) port = newPort; *portStr = 0; } + free(ansiName); // Initialize lookup Lookup * lookup = new Lookup; diff --git a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp index 2c8495a2..dfedf466 100644 --- a/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp +++ b/Sources/Plasma/PubUtilLib/plPipeline/hsG3DDeviceSelector.cpp @@ -313,8 +313,6 @@ void hsG3DDeviceSelector::RemoveUnusableDevModes(bool bTough) } else if (fRecords[i].GetG3DDeviceType() == hsG3DDeviceSelector::kDevTypeDirect3D) { - uint32_t totalMem; - // Remove software Direct3D devices if ((fRecords[i].GetG3DHALorHEL() != hsG3DDeviceSelector::kHHD3DHALDev) && (fRecords[i].GetG3DHALorHEL() != hsG3DDeviceSelector::kHHD3DTnLHalDev))