Merge branch 'development' into cmake/linux_fix_warn_unused
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com> # Conflicts: # Code/Framework/AzCore/AzCore/Math/Guid.h # cmake/Platform/Common/MSVC/Configurations_msvc.cmake
This commit is contained in:
@@ -5,6 +5,7 @@ __pycache__
|
||||
AssetProcessorTemp/**
|
||||
[Bb]uild/**
|
||||
[Oo]ut/**
|
||||
CMakeUserPresets.json
|
||||
[Cc]ache/
|
||||
/install/
|
||||
Editor/EditorEventLog.xml
|
||||
|
||||
@@ -286,7 +286,7 @@ AZ_POP_DISABLE_WARNING
|
||||
str += "Version Unknown";
|
||||
}
|
||||
}
|
||||
azsnprintf(szBuffer, MAX_LOGBUFFER_SIZE, " %d.%d", OSVerInfo.dwMajorVersion, OSVerInfo.dwMinorVersion);
|
||||
azsnprintf(szBuffer, MAX_LOGBUFFER_SIZE, " %ld.%ld", OSVerInfo.dwMajorVersion, OSVerInfo.dwMinorVersion);
|
||||
str += szBuffer;
|
||||
|
||||
//////////////////////////////////////////////////////////////////////
|
||||
@@ -337,7 +337,7 @@ AZ_POP_DISABLE_WARNING
|
||||
str += " ";
|
||||
azstrdate(szBuffer);
|
||||
str += szBuffer;
|
||||
azsnprintf(szBuffer, MAX_LOGBUFFER_SIZE, ", system running for %d minutes", GetTickCount() / 60000);
|
||||
azsnprintf(szBuffer, MAX_LOGBUFFER_SIZE, ", system running for %ld minutes", GetTickCount() / 60000);
|
||||
str += szBuffer;
|
||||
CryLog("%s", str.toUtf8().data());
|
||||
#else
|
||||
@@ -387,7 +387,7 @@ AZ_POP_DISABLE_WARNING
|
||||
L"(Unknown graphics card)", szLanguageBufferW, sizeof(szLanguageBufferW),
|
||||
L"system.ini");
|
||||
AZStd::to_string(szLanguageBuffer, szLanguageBufferW);
|
||||
azsnprintf(szBuffer, MAX_LOGBUFFER_SIZE, "Current display mode is %dx%dx%d, %s",
|
||||
azsnprintf(szBuffer, MAX_LOGBUFFER_SIZE, "Current display mode is %ldx%ldx%ld, %s",
|
||||
DisplayConfig.dmPelsWidth, DisplayConfig.dmPelsHeight,
|
||||
DisplayConfig.dmBitsPerPel, szLanguageBuffer.c_str());
|
||||
CryLog("%s", szBuffer);
|
||||
|
||||
@@ -35,7 +35,7 @@ namespace AzToolsFramework
|
||||
: public AZ::Component
|
||||
, public EditorLayerTrackViewRequestBus::Handler
|
||||
{
|
||||
AZ_PUSH_DISABLE_DLL_EXPORT_MEMBER_WARNING
|
||||
AZ_POP_DISABLE_DLL_EXPORT_MEMBER_WARNING
|
||||
AZ_POP_DISABLE_DLL_EXPORT_BASECLASS_WARNING
|
||||
public:
|
||||
AZ_COMPONENT(TrackViewComponent, "{3CF943CC-6F10-4B19-88FC-CFB697558FFD}")
|
||||
|
||||
@@ -48,7 +48,7 @@ inline bool GuidUtil::IsEmpty(REFGUID guid)
|
||||
inline const char* GuidUtil::ToString(REFGUID guid)
|
||||
{
|
||||
static char guidString[64];
|
||||
sprintf_s(guidString, "{%.8X-%.4X-%.4X-%.2X%.2X-%.2X%.2X%.2X%.2X%.2X%.2X}", guid.Data1, guid.Data2, guid.Data3, guid.Data4[0], guid.Data4[1],
|
||||
sprintf_s(guidString, "{%.8" GUID_FORMAT_DATA1 "-%.4X-%.4X-%.2X%.2X-%.2X%.2X%.2X%.2X%.2X%.2X}", guid.Data1, guid.Data2, guid.Data3, guid.Data4[0], guid.Data4[1],
|
||||
guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], guid.Data4[6], guid.Data4[7]);
|
||||
return guidString;
|
||||
}
|
||||
@@ -62,7 +62,7 @@ inline GUID GuidUtil::FromString(const char* guidString)
|
||||
guid.Data1 = 0;
|
||||
guid.Data2 = 0;
|
||||
guid.Data3 = 0;
|
||||
azsscanf(guidString, "{%8" SCNx32 "-%4hX-%4hX-%2X%2X-%2X%2X%2X%2X%2X%2X}",
|
||||
azsscanf(guidString, "{%8" GUID_FORMAT_DATA1 "-%4hX-%4hX-%2X%2X-%2X%2X%2X%2X%2X%2X}",
|
||||
&guid.Data1, &guid.Data2, &guid.Data3, &d[0], &d[1], &d[2], &d[3], &d[4], &d[5], &d[6], &d[7]);
|
||||
guid.Data4[0] = static_cast<unsigned char>(d[0]);
|
||||
guid.Data4[1] = static_cast<unsigned char>(d[1]);
|
||||
|
||||
@@ -8,18 +8,21 @@
|
||||
#ifndef AZ_CORE_GUID_H
|
||||
#define AZ_CORE_GUID_H 1
|
||||
|
||||
#ifndef GUID_DEFINED
|
||||
#if defined(GUID_DEFINED)
|
||||
#define GUID_FORMAT_DATA1 "lX"
|
||||
#else
|
||||
#define GUID_DEFINED
|
||||
|
||||
#include <AzCore/std/containers/array.h>
|
||||
|
||||
struct _GUID {
|
||||
uint32_t Data1;
|
||||
uint32_t Data1;
|
||||
unsigned short Data2;
|
||||
unsigned short Data3;
|
||||
AZStd::array<unsigned char,8> Data4;
|
||||
};
|
||||
using GUID = _GUID;
|
||||
#define GUID_FORMAT_DATA1 "X"
|
||||
#endif // GUID_DEFINED
|
||||
|
||||
#if !defined _SYS_GUID_OPERATOR_EQ_ && !defined _NO_SYS_GUID_OPERATOR_EQ_
|
||||
|
||||
@@ -145,7 +145,7 @@ namespace AZ
|
||||
|
||||
char message[g_maxMessageLength];
|
||||
Debug::Trace::Instance().Output(nullptr, "==================================================================\n");
|
||||
azsnprintf(message, g_maxMessageLength, "Exception : 0x%X - '%s' [%p]\n", ExceptionInfo->ExceptionRecord->ExceptionCode, GetExeptionName(ExceptionInfo->ExceptionRecord->ExceptionCode), ExceptionInfo->ExceptionRecord->ExceptionAddress);
|
||||
azsnprintf(message, g_maxMessageLength, "Exception : 0x%lX - '%s' [%p]\n", ExceptionInfo->ExceptionRecord->ExceptionCode, GetExeptionName(ExceptionInfo->ExceptionRecord->ExceptionCode), ExceptionInfo->ExceptionRecord->ExceptionAddress);
|
||||
Debug::Trace::Instance().Output(nullptr, message);
|
||||
|
||||
EBUS_EVENT(Debug::TraceMessageDrillerBus, OnException, message);
|
||||
|
||||
@@ -478,7 +478,7 @@ namespace AZ {
|
||||
DWORD displacement;
|
||||
if (g_SymGetLineFromAddr64(g_currentProcess, pc, &displacement, &line) && line.FileName[0] != 0)
|
||||
{
|
||||
azsnprintf(textLine, textLineSize, "%s (%d) : ", line.FileName, line.LineNumber);
|
||||
azsnprintf(textLine, textLineSize, "%s (%ld) : ", line.FileName, line.LineNumber);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
+3
@@ -14,6 +14,9 @@
|
||||
#include <AzCore/Settings/SettingsRegistryMergeUtils.h>
|
||||
#include <AzCore/std/containers/unordered_map.h>
|
||||
#include <AzCore/StringFunc/StringFunc.h>
|
||||
|
||||
// https://developercommunity.visualstudio.com/t/windows-sdk-100177630-pragma-push-pop-mismatch-in/386142
|
||||
#define _NTDDSCM_H_
|
||||
#include <winioctl.h>
|
||||
|
||||
namespace AZ::IO
|
||||
|
||||
@@ -34,7 +34,6 @@
|
||||
////#define NOMB //- MB_* and MessageBox()
|
||||
//#define NOMEMMGR //- GMEM_*, LMEM_*, GHND, LHND, associated routines
|
||||
//#define NOMETAFILE //- typedef METAFILEPICT
|
||||
////#define NOMINMAX //- Macros min(a,b) and max(a,b)
|
||||
//#define NOMSG //- typedef MSG and associated routines
|
||||
//#define NOOPENFILE //- OpenFile(), OemToAnsi, AnsiToOem, and OF_*
|
||||
//#define NOSCROLL //- SB_* and scrolling routines
|
||||
@@ -50,27 +49,24 @@
|
||||
//#define NODEFERWINDOWPOS //- DeferWindowPos routines
|
||||
//#define NOMCX //- Modem Configuration Extensions
|
||||
|
||||
// //declare intrinsics to make sure we get the inline intrinsic versions and not a function call
|
||||
#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0602)
|
||||
# undef _WIN32_WINNT
|
||||
# define _WIN32_WINNT 0x0602 // Windows Server 2012 and later
|
||||
#undef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0602 // Windows Server 2012 and later
|
||||
#endif
|
||||
#ifdef NOMINMAX
|
||||
# include <WinSock2.h>
|
||||
# include <windows.h>
|
||||
#else
|
||||
# define NOMINMAX
|
||||
# include <WinSock2.h>
|
||||
# include <windows.h>
|
||||
# undef NOMINMAX
|
||||
#if !defined(NOMINMAX)
|
||||
#define NOMINMAX // - Dont define Macros min(a,b) and max(a,b)
|
||||
#endif
|
||||
|
||||
#include <WinSock2.h>
|
||||
#include <windows.h>
|
||||
|
||||
// Undef common function names that Windows.h defines
|
||||
#if defined(SetJob)
|
||||
#undef SetJob
|
||||
#undef SetJob
|
||||
#endif
|
||||
#if defined(GetObject)
|
||||
#undef GetObject
|
||||
#undef GetObject
|
||||
#endif
|
||||
#if defined(GetCommandLine)
|
||||
#undef GetCommandLine
|
||||
#undef GetCommandLine
|
||||
#endif
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
#include <QtWidgets/QMessageBox>
|
||||
AZ_PUSH_DISABLE_WARNING(4251, "-Wunknown-warning-option") // 4251: 'QFileInfo::d_ptr': class 'QSharedDataPointer<QFileInfoPrivate>' needs to have dll-interface to be used by clients of class 'QFileInfo'
|
||||
#include <QDir>
|
||||
AZ_POP_DISABLE_OVERRIDE_WARNING
|
||||
AZ_POP_DISABLE_WARNING
|
||||
#include <QJsonArray>
|
||||
#include <QJsonDocument>
|
||||
#include <QJsonObject>
|
||||
|
||||
+1
-1
@@ -48,7 +48,7 @@
|
||||
|
||||
AZ_PUSH_DISABLE_WARNING(4251, "-Wunknown-warning-option") // 'QFileInfo::d_ptr': class 'QSharedDataPointer<QFileInfoPrivate>' needs to have dll-interface to be used by clients of class 'QFileInfo'
|
||||
#include <QFileInfo>
|
||||
AZ_POP_DISABLE_OVERRIDE_WARNING
|
||||
AZ_POP_DISABLE_WARNING
|
||||
#include <QSharedMemory>
|
||||
#include <QStandardPaths>
|
||||
#include <QtWidgets/QApplication>
|
||||
|
||||
@@ -1707,7 +1707,7 @@ TEST_F(GridMateCarrierTestFixture, Test_GetSocketErrorString)
|
||||
static constexpr char posixErrorWouldBlockPosixErrStr[] = "Resource temporarily unavailable";
|
||||
azsnprintf(expectedBuffer.data(), expectedBuffer.size()-1 , "%s", posixErrorWouldBlockPosixErrStr);
|
||||
#else
|
||||
azsnprintf(expectedBuffer.data(), expectedBuffer.size()-1 , "%d", AZ_EWOULDBLOCK);
|
||||
azsnprintf(expectedBuffer.data(), expectedBuffer.size()-1 , "%ld", AZ_EWOULDBLOCK);
|
||||
#endif // !AZ_TRAIT_USE_POSIX_STRERROR_R
|
||||
EXPECT_STREQ(expectedBuffer.data(), socketErrorString);
|
||||
EXPECT_STREQ(expectedBuffer.data(), buffer.data());
|
||||
|
||||
@@ -18,6 +18,7 @@
|
||||
#include <AzCore/std/string/conversions.h>
|
||||
#include <AzCore/Utils/Utils.h>
|
||||
|
||||
|
||||
// Section dictionary
|
||||
#if defined(AZ_RESTRICTED_PLATFORM)
|
||||
#define PLATFORM_IMPL_H_SECTION_TRAITS 1
|
||||
|
||||
@@ -284,7 +284,7 @@ int DebugCallStack::handleException(EXCEPTION_POINTERS* exception_pointer)
|
||||
char excAddr[80];
|
||||
WriteLineToLog("<CRITICAL EXCEPTION>");
|
||||
sprintf_s(excAddr, "0x%04X:0x%p", exception_pointer->ContextRecord->SegCs, exception_pointer->ExceptionRecord->ExceptionAddress);
|
||||
sprintf_s(excCode, "0x%08X", exception_pointer->ExceptionRecord->ExceptionCode);
|
||||
sprintf_s(excCode, "0x%08lX", exception_pointer->ExceptionRecord->ExceptionCode);
|
||||
WriteLineToLog("Exception: %s, at Address: %s", excCode, excAddr);
|
||||
}
|
||||
|
||||
@@ -445,7 +445,7 @@ void DebugCallStack::LogExceptionInfo(EXCEPTION_POINTERS* pex)
|
||||
else
|
||||
{
|
||||
sprintf_s(excAddr, "0x%04X:0x%p", pex->ContextRecord->SegCs, pex->ExceptionRecord->ExceptionAddress);
|
||||
sprintf_s(excCode, "0x%08X", pex->ExceptionRecord->ExceptionCode);
|
||||
sprintf_s(excCode, "0x%08lX", pex->ExceptionRecord->ExceptionCode);
|
||||
excName = TranslateExceptionCode(pex->ExceptionRecord->ExceptionCode);
|
||||
azstrcpy(desc, AZ_ARRAY_SIZE(desc), "");
|
||||
sprintf_s(excDesc, "%s\r\n%s", excName, desc);
|
||||
|
||||
@@ -63,7 +63,7 @@ namespace AZ
|
||||
SceneGraph m_graph;
|
||||
SceneManifest m_manifest;
|
||||
SceneOrientation m_originalOrientation = SceneOrientation::YUp;
|
||||
AZ_POP_DISABLE_OVERRIDE_WARNING
|
||||
AZ_POP_DISABLE_WARNING
|
||||
};
|
||||
} // Containers
|
||||
} // SceneAPI
|
||||
|
||||
@@ -106,7 +106,7 @@ namespace AZ
|
||||
AZ_PUSH_DISABLE_WARNING(4251, "-Wunknown-warning-option")
|
||||
StorageLookup m_storageLookup;
|
||||
ValueStorage m_values;
|
||||
AZ_POP_DISABLE_OVERRIDE_WARNING
|
||||
AZ_POP_DISABLE_WARNING
|
||||
};
|
||||
} // Containers
|
||||
} // SceneAPI
|
||||
|
||||
@@ -55,7 +55,7 @@ namespace AZ::SceneAPI
|
||||
AZ::Transform m_targetTransform;
|
||||
AZ::Transform m_conversionTransform;
|
||||
AZ::Transform m_conversionTransformInversed;
|
||||
AZ_POP_DISABLE_OVERRIDE_WARNING
|
||||
AZ_POP_DISABLE_WARNING
|
||||
AZ::u32 m_targetBasisIndices[3];
|
||||
bool m_needsConversion;
|
||||
bool m_sourceRightHanded;
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@
|
||||
// Disable warnings in moc code
|
||||
AZ_PUSH_DISABLE_WARNING(4251 4800, "-Wunknown-warning-option")
|
||||
#include <Editor/View/Widgets/LoggingPanel/PivotTree/ui_PivotTreeWidget.h>
|
||||
AZ_POP_DISABLE_OVERRIDE_WARNING
|
||||
AZ_POP_DISABLE_WARNING
|
||||
|
||||
namespace ScriptCanvasEditor
|
||||
{
|
||||
|
||||
@@ -41,13 +41,11 @@ ly_append_configurations_options(
|
||||
# https://docs.microsoft.com/en-us/cpp/preprocessor/compiler-warnings-that-are-off-by-default?view=vs-2019
|
||||
/we4296 # 'operator': expression is always false
|
||||
/we5233 # explicit lambda capture 'identifier' is not used
|
||||
|
||||
# /we4426 # optimization flags changed after including header, may be due to #pragma optimize()
|
||||
# /we4464 # relative include path contains '..'
|
||||
# /we4619 # #pragma warning: there is no warning number 'number'
|
||||
# /we4777 # 'function' : format string 'string' requires an argument of type 'type1', but variadic argument number has type 'type2'
|
||||
# /we5031 # #pragma warning(pop): likely mismatch, popping warning state pushed in different file
|
||||
# /WE5032 # detected #pragma warning(push) with no corresponding #pragma warning(pop)
|
||||
/we4426 # optimization flags changed after including header, may be due to #pragma optimize()
|
||||
#/we4619 # #pragma warning: there is no warning number 'number'. Unfortunately some versions of MSVC 16.X dont filter this warning coming from external headers and Qt has a bad warning in QtCore/qvector.h(340,12)
|
||||
/we4777 # 'function' : format string 'string' requires an argument of type 'type1', but variadic argument number has type 'type2
|
||||
/we5031 # #pragma warning(pop): likely mismatch, popping warning state pushed in different file
|
||||
/we5032 # detected #pragma warning(push) with no corresponding #pragma warning(pop)
|
||||
|
||||
/Zc:forScope # Force Conformance in for Loop Scope
|
||||
/diagnostics:caret # Compiler diagnostic options: includes the column where the issue was found and places a caret (^) under the location in the line of code where the issue was detected.
|
||||
|
||||
Reference in New Issue
Block a user