Use attributes where possible
This commit is contained in:
@@ -467,7 +467,7 @@ static bool PointsToValidCall( ULONG_PTR ptr )
|
||||
return IsValidCall(buf+7, len);
|
||||
}
|
||||
|
||||
void CrashHandler::do_backtrace( const void **buf, size_t size,
|
||||
void CrashHandler::do_backtrace( const void **buf, size_t size,
|
||||
HANDLE hProcess, HANDLE hThread, const CONTEXT *pContext )
|
||||
{
|
||||
const void **pLast = buf + size - 1;
|
||||
@@ -535,7 +535,7 @@ void CrashHandler::do_backtrace( const void **buf, size_t size,
|
||||
MEMORY_BASIC_INFORMATION meminfo;
|
||||
|
||||
VirtualQuery((void *)data, &meminfo, sizeof meminfo);
|
||||
|
||||
|
||||
if (!IsExecutableProtection(meminfo.Protect) || meminfo.State!=MEM_COMMIT)
|
||||
fValid = false;
|
||||
|
||||
@@ -563,7 +563,8 @@ void CrashHandler::do_backtrace( const void **buf, size_t size,
|
||||
}
|
||||
|
||||
// Trigger the crash handler. This works even in the debugger.
|
||||
static void SM_NORETURN debug_crash()
|
||||
[[noreturn]]
|
||||
static void debug_crash()
|
||||
{
|
||||
// __try {
|
||||
#if defined(__MSC_VER)
|
||||
@@ -652,7 +653,7 @@ void CrashHandler::ForceCrash( const char *reason )
|
||||
* (c) 1998-2001 Avery Lee
|
||||
* (c) 2003-2004 Glenn Maynard
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -662,7 +663,7 @@ void CrashHandler::ForceCrash( const char *reason )
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
@@ -1,6 +1,7 @@
|
||||
#ifndef RESTART_PROGRAM_H
|
||||
#define RESTART_PROGRAM_H
|
||||
|
||||
[[noreturn]]
|
||||
void Win32RestartProgram();
|
||||
|
||||
#endif
|
||||
@@ -8,7 +9,7 @@ void Win32RestartProgram();
|
||||
/*
|
||||
* (c) 2002-2004 Chris Danford
|
||||
* All rights reserved.
|
||||
*
|
||||
*
|
||||
* Permission is hereby granted, free of charge, to any person obtaining a
|
||||
* copy of this software and associated documentation files (the
|
||||
* "Software"), to deal in the Software without restriction, including
|
||||
@@ -18,7 +19,7 @@ void Win32RestartProgram();
|
||||
* copyright notice(s) and this permission notice appear in all copies of
|
||||
* the Software and that both the above copyright notice(s) and this
|
||||
* permission notice appear in supporting documentation.
|
||||
*
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
|
||||
* OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
||||
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF
|
||||
|
||||
Reference in New Issue
Block a user