Skip to content

Commit

Permalink
Fix mono runtime build warnings when building iOS config (#36435)
Browse files Browse the repository at this point in the history
```
  /Users/alexander/dev/runtime/src/mono/mono/mini/aot-runtime.c:5647:13: warning: unused variable 'image' [-Wunused-variable]

  /Users/alexander/dev/runtime/src/mono/mono/mini/simd-intrinsics-netcore.c:11:1: warning: no previous prototype for function 'mono_simd_intrinsics_init' [-Wmissing-prototypes]

  /Users/alexander/dev/runtime/src/mono/mono/utils/mono-state.c:1230:1: warning: no previous prototype for function 'mono_crash_save_failfast_msg' [-Wmissing-prototypes]
  /Users/alexander/dev/runtime/src/mono/mono/utils/mono-state.c:1236:1: warning: no previous prototype for function 'mono_crash_get_failfast_msg' [-Wmissing-prototypes]
```
  • Loading branch information
akoeplinger committed May 14, 2020
1 parent 9c5c657 commit a93f9ef
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 18 deletions.
1 change: 0 additions & 1 deletion src/mono/mono/mini/aot-runtime.c
Original file line number Diff line number Diff line change
Expand Up @@ -5644,7 +5644,6 @@ read_page_trampoline_uwinfo (MonoTrampInfo *info, int tramp_type, gboolean is_ge
static unsigned char*
get_new_trampoline_from_page (int tramp_type)
{
MonoImage *image;
TrampolinePage *page;
int count;
void *tpage;
Expand Down
2 changes: 1 addition & 1 deletion src/mono/mono/mini/simd-intrinsics-netcore.c
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

#include <config.h>
#include <mono/utils/mono-compiler.h>
#include "mini.h"

#if defined(DISABLE_JIT)

Expand All @@ -18,7 +19,6 @@ mono_simd_intrinsics_init (void)
* Only LLVM is supported as a backend.
*/

#include "mini.h"
#include "mini-runtime.h"
#include "ir-emit.h"
#ifdef ENABLE_LLVM
Expand Down
32 changes: 16 additions & 16 deletions src/mono/mono/utils/mono-state.c
Original file line number Diff line number Diff line change
Expand Up @@ -1202,22 +1202,6 @@ mono_crash_dump (const char *jsonFile, MonoStackHash *hashes)
return;
}

#endif // DISABLE_CRASH_REPORTING

static volatile int32_t dump_status;

gboolean
mono_dump_start (void)
{
return (mono_atomic_xchg_i32(&dump_status, 1) == 0); // return true if we started the dump
}

gboolean
mono_dump_complete (void)
{
return (mono_atomic_xchg_i32(&dump_status, 0) == 1); // return true if we completed the dump
}

static char *saved_failfast_msg;

/**
Expand All @@ -1237,3 +1221,19 @@ mono_crash_get_failfast_msg (void)
{
return saved_failfast_msg;
}

#endif // DISABLE_CRASH_REPORTING

static volatile int32_t dump_status;

gboolean
mono_dump_start (void)
{
return (mono_atomic_xchg_i32(&dump_status, 1) == 0); // return true if we started the dump
}

gboolean
mono_dump_complete (void)
{
return (mono_atomic_xchg_i32(&dump_status, 0) == 1); // return true if we completed the dump
}

0 comments on commit a93f9ef

Please sign in to comment.