Skip to content

Commit 1ad2da3

Browse files
committed
Fix QEMU_UNUSED_FUNC
1 parent 13a8da8 commit 1ad2da3

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

qemu/include/tcg/tcg-apple-jit.h

+7-7
Original file line numberDiff line numberDiff line change
@@ -27,8 +27,8 @@
2727

2828
#include "assert.h"
2929
#include "stdint.h"
30-
#include "stdlib.h"
3130
#include "stdbool.h"
31+
#include "qemu/compiler.h"
3232

3333
// Returns the S3_6_c15_c1_5 register's value
3434
// Taken from
@@ -53,7 +53,7 @@ static inline uint64_t read_sprr_perm(void)
5353

5454
#if defined(__APPLE__) && defined(HAVE_PTHREAD_JIT_PROTECT) && (defined(__arm__) || defined(__aarch64__))
5555

56-
__attribute__((unused)) static inline uint8_t thread_mask()
56+
QEMU_UNUSED_FUNC static inline uint8_t thread_mask()
5757
{
5858
uint64_t v = read_sprr_perm();
5959

@@ -64,12 +64,12 @@ __attribute__((unused)) static inline uint8_t thread_mask()
6464
}
6565
}
6666

67-
__attribute__((unused)) static inline bool thread_writeable()
67+
QEMU_UNUSED_FUNC static inline bool thread_writeable()
6868
{
6969
return thread_mask() == 3;
7070
}
7171

72-
__attribute__((unused)) static inline bool thread_executable()
72+
QEMU_UNUSED_FUNC static inline bool thread_executable()
7373
{
7474
return thread_mask() == 1;
7575
}
@@ -84,17 +84,17 @@ static inline void assert_executable(bool executable) {
8484

8585
#else
8686

87-
__attribute__((unused)) static inline uint8_t thread_mask()
87+
QEMU_UNUSED_FUNC static inline uint8_t thread_mask()
8888
{
8989
return 0;
9090
}
9191

92-
__attribute__((unused)) static inline bool thread_writeable()
92+
QEMU_UNUSED_FUNC static inline bool thread_writeable()
9393
{
9494
return false;
9595
}
9696

97-
__attribute__((unused)) static inline bool thread_executable()
97+
QEMU_UNUSED_FUNC static inline bool thread_executable()
9898
{
9999
return false;
100100
}

0 commit comments

Comments
 (0)