提交 2d8ac5eb 编写于 作者: S SeokYeon Hwang 提交者: Michael Tokarev

translate-all: Mark map_exec() with the 'unused' attribute

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: NSeokYeon Hwang <syeon.hwang@samsung.com>
Reviewed-by: NPaolo Bonzini <pbonzini@redhat.com>
[PMM: tweaked comment message a little]
Signed-off-by: NPeter Maydell <peter.maydell@linaro.org>
Signed-off-by: NMichael Tokarev <mjt@tls.msk.ru>
上级 9c6d5c1a
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册