qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [Qemu-devel] [PATCH v2] translate-all: Marked map_exec() with the 'unused' attribute
@ 2014-11-03  8:11 SeokYeon Hwang
  2014-11-03 15:03 ` Peter Maydell
  2014-11-05 11:01 ` Paolo Bonzini
  0 siblings, 2 replies; 3+ messages in thread
From: SeokYeon Hwang @ 2014-11-03  8:11 UTC (permalink / raw)
  To: qemu-devel; +Cc: peter.maydell, SeokYeon Hwang

Marked map_exec() with the 'unused' attribute to avoid '-Wunused-function' on clang 3.4 or later.

Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
---
 translate-all.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/translate-all.c b/translate-all.c
index ba5c840..9d150fb 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;
 
-- 
2.1.0

^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v2] translate-all: Marked map_exec() with the 'unused' attribute
  2014-11-03  8:11 [Qemu-devel] [PATCH v2] translate-all: Marked map_exec() with the 'unused' attribute SeokYeon Hwang
@ 2014-11-03 15:03 ` Peter Maydell
  2014-11-05 11:01 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Peter Maydell @ 2014-11-03 15:03 UTC (permalink / raw)
  To: SeokYeon Hwang; +Cc: QEMU Developers

On 3 November 2014 08:11, SeokYeon Hwang <syeon.hwang@samsung.com> wrote:
> Marked map_exec() with the 'unused' attribute to avoid '-Wunused-function' on clang 3.4 or later.
>
> Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>
> ---
>  translate-all.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/translate-all.c b/translate-all.c
> index ba5c840..9d150fb 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;
>
> --
> 2.1.0

Reviewed-by: Peter Maydell <peter.maydell@linaro.org>

thanks
-- PMM

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Qemu-devel] [PATCH v2] translate-all: Marked map_exec() with the 'unused' attribute
  2014-11-03  8:11 [Qemu-devel] [PATCH v2] translate-all: Marked map_exec() with the 'unused' attribute SeokYeon Hwang
  2014-11-03 15:03 ` Peter Maydell
@ 2014-11-05 11:01 ` Paolo Bonzini
  1 sibling, 0 replies; 3+ messages in thread
From: Paolo Bonzini @ 2014-11-05 11:01 UTC (permalink / raw)
  To: SeokYeon Hwang, qemu-devel; +Cc: qemu-trivial, peter.maydell

On 03/11/2014 09:11, SeokYeon Hwang wrote:
> Marked map_exec() with the 'unused' attribute to avoid '-Wunused-function' on clang 3.4 or later.
> 
> Signed-off-by: SeokYeon Hwang <syeon.hwang@samsung.com>

Cc: qemu-trivial@nongnu.org
Reviewed-by: Paolo Bonzini <pbonzini@redhat.com>

> ---
>  translate-all.c | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/translate-all.c b/translate-all.c
> index ba5c840..9d150fb 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;
>  
> 

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-05 11:01 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-03  8:11 [Qemu-devel] [PATCH v2] translate-all: Marked map_exec() with the 'unused' attribute SeokYeon Hwang
2014-11-03 15:03 ` Peter Maydell
2014-11-05 11:01 ` Paolo Bonzini

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).