From: SeokYeon Hwang Date: Tue, 23 Dec 2014 22:26:54 +0000 (+0000) Subject: translate-all: Mark map_exec() with the 'unused' attribute X-Git-Tag: Tizen_Studio_1.3_Release_p2.3.2~397 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=53190cc7ae512b54228645523e20bac10074dbb8;p=sdk%2Femulator%2Fqemu.git 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). Change-Id: Ic9faa221ff73082c6b15e68bdef31cc9bccd0ed1 Signed-off-by: SeokYeon Hwang Reviewed-by: Paolo Bonzini [PMM: tweaked comment message a little] Signed-off-by: Peter Maydell Signed-off-by: Michael Tokarev --- diff --git a/translate-all.c b/translate-all.c index ba5c8403d3..9d150fb2b2 100644 --- a/translate-all.c +++ b/translate-all.c @@ -270,14 +270,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;