Fix QEMU_UNUSED_FUNC

This commit is contained in:
mio
2024-12-20 00:50:11 +08:00
parent 13a8da8538
commit 1ad2da35e6

View File

@@ -27,8 +27,8 @@
#include "assert.h" #include "assert.h"
#include "stdint.h" #include "stdint.h"
#include "stdlib.h"
#include "stdbool.h" #include "stdbool.h"
#include "qemu/compiler.h"
// Returns the S3_6_c15_c1_5 register's value // Returns the S3_6_c15_c1_5 register's value
// Taken from // Taken from
@@ -53,7 +53,7 @@ static inline uint64_t read_sprr_perm(void)
#if defined(__APPLE__) && defined(HAVE_PTHREAD_JIT_PROTECT) && (defined(__arm__) || defined(__aarch64__)) #if defined(__APPLE__) && defined(HAVE_PTHREAD_JIT_PROTECT) && (defined(__arm__) || defined(__aarch64__))
__attribute__((unused)) static inline uint8_t thread_mask() QEMU_UNUSED_FUNC static inline uint8_t thread_mask()
{ {
uint64_t v = read_sprr_perm(); uint64_t v = read_sprr_perm();
@@ -64,12 +64,12 @@ __attribute__((unused)) static inline uint8_t thread_mask()
} }
} }
__attribute__((unused)) static inline bool thread_writeable() QEMU_UNUSED_FUNC static inline bool thread_writeable()
{ {
return thread_mask() == 3; return thread_mask() == 3;
} }
__attribute__((unused)) static inline bool thread_executable() QEMU_UNUSED_FUNC static inline bool thread_executable()
{ {
return thread_mask() == 1; return thread_mask() == 1;
} }
@@ -84,17 +84,17 @@ static inline void assert_executable(bool executable) {
#else #else
__attribute__((unused)) static inline uint8_t thread_mask() QEMU_UNUSED_FUNC static inline uint8_t thread_mask()
{ {
return 0; return 0;
} }
__attribute__((unused)) static inline bool thread_writeable() QEMU_UNUSED_FUNC static inline bool thread_writeable()
{ {
return false; return false;
} }
__attribute__((unused)) static inline bool thread_executable() QEMU_UNUSED_FUNC static inline bool thread_executable()
{ {
return false; return false;
} }