qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Qemu-devel] [PULL 03/12] translate-all: Mark map_exec() with the 'unuse


From: Michael Tokarev
Subject: [Qemu-devel] [PULL 03/12] translate-all: Mark map_exec() with the 'unused' attribute
Date: Thu, 15 Jan 2015 11:30:41 +0300

From: SeokYeon Hwang <address@hidden>

Mark map_exec() with the 'unused' attribute to avoid '-Wunused-function'
warnings on clang 3.4 or later. This means we don't need to mark it
'inline', which is what we were previously using to suppress the warning
(a trick which only works with gcc, not clang).

Signed-off-by: SeokYeon Hwang <address@hidden>
Reviewed-by: Paolo Bonzini <address@hidden>
[PMM: tweaked comment message a little]
Signed-off-by: Peter Maydell <address@hidden>
Signed-off-by: Michael Tokarev <address@hidden>
---
 translate-all.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/translate-all.c b/translate-all.c
index 8fa4378..687ba7d 100644
--- a/translate-all.c
+++ b/translate-all.c
@@ -276,14 +276,14 @@ bool cpu_restore_state(CPUState *cpu, uintptr_t retaddr)
 }
 
 #ifdef _WIN32
-static inline void map_exec(void *addr, long size)
+static __attribute__((unused)) void map_exec(void *addr, long size)
 {
     DWORD old_protect;
     VirtualProtect(addr, size,
                    PAGE_EXECUTE_READWRITE, &old_protect);
 }
 #else
-static inline void map_exec(void *addr, long size)
+static __attribute__((unused)) void map_exec(void *addr, long size)
 {
     unsigned long start, end, page_size;
 
-- 
2.1.4




reply via email to

[Prev in Thread] Current Thread [Next in Thread]