Clean up some clang warnings on macOS

This commit is contained in:
cold-brewed
2023-08-09 07:37:45 -04:00
parent b28d82a38e
commit 3795016a82
2 changed files with 12 additions and 4 deletions

View File

@@ -918,11 +918,15 @@ pc_init_modules(void)
#ifdef USE_DYNAREC #ifdef USE_DYNAREC
# if defined(__APPLE__) && defined(__aarch64__) # if defined(__APPLE__) && defined(__aarch64__)
pthread_jit_write_protect_np(0); if (__builtin_available(macOS 11.0, *)) {
pthread_jit_write_protect_np(0);
}
# endif # endif
codegen_init(); codegen_init();
# if defined(__APPLE__) && defined(__aarch64__) # if defined(__APPLE__) && defined(__aarch64__)
pthread_jit_write_protect_np(1); if (__builtin_available(macOS 11.0, *)) {
pthread_jit_write_protect_np(1);
}
# endif # endif
#endif #endif

View File

@@ -484,7 +484,9 @@ exec386_dynarec_dyn(void)
x86_was_reset = 0; x86_was_reset = 0;
# if defined(__APPLE__) && defined(__aarch64__) # if defined(__APPLE__) && defined(__aarch64__)
pthread_jit_write_protect_np(0); if (__builtin_available(macOS 11.0, *)) {
pthread_jit_write_protect_np(0);
}
# endif # endif
codegen_block_start_recompile(block); codegen_block_start_recompile(block);
codegen_in_recompile = 1; codegen_in_recompile = 1;
@@ -568,7 +570,9 @@ exec386_dynarec_dyn(void)
codegen_in_recompile = 0; codegen_in_recompile = 0;
# if defined(__APPLE__) && defined(__aarch64__) # if defined(__APPLE__) && defined(__aarch64__)
pthread_jit_write_protect_np(1); if (__builtin_available(macOS 11.0, *)) {
pthread_jit_write_protect_np(1);
}
# endif # endif
} else if (!cpu_state.abrt) { } else if (!cpu_state.abrt) {
/* Mark block but do not recompile */ /* Mark block but do not recompile */