Skip to content

Commit

Permalink
Merge pull request #831 from madewokherd/win64-warnings
Browse files Browse the repository at this point in the history
fix various warnings in win64 exception code
  • Loading branch information
Alex Rønne Petersen committed Dec 9, 2013
2 parents e652c6d + 493d786 commit a07c846
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions mono/mini/exceptions-amd64.c
Original file line number Diff line number Diff line change
Expand Up @@ -46,13 +46,13 @@ static MonoW32ExceptionHandler ill_handler;
static MonoW32ExceptionHandler segv_handler;

LPTOP_LEVEL_EXCEPTION_FILTER mono_old_win_toplevel_exception_filter;
guint64 mono_win_vectored_exception_handle;
void *mono_win_vectored_exception_handle;
extern gboolean mono_win_chained_exception_needs_run;

#define W32_SEH_HANDLE_EX(_ex) \
if (_ex##_handler) _ex##_handler(0, ep, sctx)

LONG CALLBACK seh_unhandled_exception_filter(EXCEPTION_POINTERS* ep)
static LONG CALLBACK seh_unhandled_exception_filter(EXCEPTION_POINTERS* ep)
{
#ifndef MONO_CROSS_COMPILE
if (mono_old_win_toplevel_exception_filter) {
Expand All @@ -69,7 +69,7 @@ LONG CALLBACK seh_unhandled_exception_filter(EXCEPTION_POINTERS* ep)
* Unhandled Exception Filter
* Top-level per-process exception handler.
*/
LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep)
static LONG CALLBACK seh_vectored_exception_handler(EXCEPTION_POINTERS* ep)
{
EXCEPTION_RECORD* er;
CONTEXT* ctx;
Expand Down Expand Up @@ -160,10 +160,10 @@ void win32_seh_init()

void win32_seh_cleanup()
{
if (mono_old_win_toplevel_exception_filter) SetUnhandledExceptionFilter(mono_old_win_toplevel_exception_filter);

guint32 ret = 0;

if (mono_old_win_toplevel_exception_filter) SetUnhandledExceptionFilter(mono_old_win_toplevel_exception_filter);

ret = RemoveVectoredExceptionHandler (mono_win_vectored_exception_handle);
g_assert (ret);
}
Expand Down Expand Up @@ -1344,7 +1344,7 @@ mono_arch_unwindinfo_get_size (gpointer monoui)
(sizeof (UNWIND_CODE) * (MONO_MAX_UNWIND_CODES - unwindinfo->unwindInfo.CountOfCodes));
}

PRUNTIME_FUNCTION
static PRUNTIME_FUNCTION
MONO_GET_RUNTIME_FUNCTION_CALLBACK ( DWORD64 ControlPc, IN PVOID Context )
{
MonoJitInfo *ji;
Expand Down
2 changes: 1 addition & 1 deletion mono/mini/mini-amd64.h
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ struct sigcontext {
guint64 eip;
};

typedef void (* MonoW32ExceptionHandler) (int _dummy, EXCEPTION_RECORD *info, void *context);
typedef void (* MonoW32ExceptionHandler) (int _dummy, EXCEPTION_POINTERS *info, void *context);
void win32_seh_init(void);
void win32_seh_cleanup(void);
void win32_seh_set_handler(int type, MonoW32ExceptionHandler handler);
Expand Down

0 comments on commit a07c846

Please sign in to comment.