platform.h cleanup
Signed-off-by: Esteban Papp <81431996+amznestebanpapp@users.noreply.github.com>
This commit is contained in:
@@ -227,7 +227,7 @@ void IDebugCallStack::FatalError(const char* description)
|
||||
|
||||
#if defined(WIN32) || !defined(_RELEASE)
|
||||
int* p = 0x0;
|
||||
PREFAST_SUPPRESS_WARNING(6011) * p = 1; // we're intentionally crashing here
|
||||
*p = 1; // we're intentionally crashing here
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -252,7 +252,7 @@ static void CmdCrashTest(IConsoleCmdArgs* pArgs)
|
||||
case 1:
|
||||
{
|
||||
int* p = 0;
|
||||
PREFAST_SUPPRESS_WARNING(6011) * p = 0xABCD;
|
||||
*p = 0xABCD;
|
||||
}
|
||||
break;
|
||||
case 2:
|
||||
|
||||
@@ -355,32 +355,25 @@ void CSystem::FatalError(const char* format, ...)
|
||||
IDebugCallStack::instance()->FatalError(szBuffer);
|
||||
#endif
|
||||
|
||||
CryDebugBreak();
|
||||
|
||||
// app can not continue
|
||||
AZ::Debug::Trace::Break();
|
||||
|
||||
#ifdef _DEBUG
|
||||
#if defined(WIN32) || defined(WIN64)
|
||||
_flushall();
|
||||
// on windows, _exit does all sorts of things which can cause cleanup to fail during a crash, we need to terminate instead.
|
||||
TerminateProcess(GetCurrentProcess(), 1);
|
||||
#endif
|
||||
|
||||
#if defined(WIN32) && !defined(WIN64)
|
||||
DEBUG_BREAK;
|
||||
#endif
|
||||
|
||||
#else
|
||||
|
||||
#if defined(WIN32) || defined(WIN64)
|
||||
_flushall();
|
||||
// on windows, _exit does all sorts of things which can cause cleanup to fail during a crash, we need to terminate instead.
|
||||
TerminateProcess(GetCurrentProcess(), 1);
|
||||
#endif
|
||||
|
||||
#if defined(AZ_RESTRICTED_PLATFORM)
|
||||
#define AZ_RESTRICTED_SECTION SYSTEMWIN32_CPP_SECTION_2
|
||||
#include AZ_RESTRICTED_FILE(SystemWin32_cpp)
|
||||
#endif
|
||||
#if defined(AZ_RESTRICTED_SECTION_IMPLEMENTED)
|
||||
#undef AZ_RESTRICTED_SECTION_IMPLEMENTED
|
||||
#else
|
||||
_exit(1);
|
||||
#endif
|
||||
#if defined(AZ_RESTRICTED_PLATFORM)
|
||||
#define AZ_RESTRICTED_SECTION SYSTEMWIN32_CPP_SECTION_2
|
||||
#include AZ_RESTRICTED_FILE(SystemWin32_cpp)
|
||||
#endif
|
||||
#if defined(AZ_RESTRICTED_SECTION_IMPLEMENTED)
|
||||
#undef AZ_RESTRICTED_SECTION_IMPLEMENTED
|
||||
#else
|
||||
_exit(1);
|
||||
#endif
|
||||
#endif
|
||||
}
|
||||
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
if (count > 0) \
|
||||
{ \
|
||||
const size_t memSize = count * sizeof(IViewSystemListener*); \
|
||||
PREFAST_SUPPRESS_WARNING(6255) IViewSystemListener * *pArray = (IViewSystemListener**) alloca(memSize); \
|
||||
IViewSystemListener* *pArray = (IViewSystemListener**) alloca(memSize); \
|
||||
memcpy(pArray, &*m_listeners.begin(), memSize); \
|
||||
while (count--) \
|
||||
{ \
|
||||
|
||||
@@ -1390,7 +1390,7 @@ protected:
|
||||
{
|
||||
((XmlParserImp*)userData)->onEndElement(name);
|
||||
}
|
||||
static void characterData(void* userData, const char* s, int len) PREFAST_SUPPRESS_WARNING(6262)
|
||||
static void characterData(void* userData, const char* s, int len)
|
||||
{
|
||||
char str[32700];
|
||||
if (len > sizeof(str) - 1)
|
||||
|
||||
Reference in New Issue
Block a user