diff mbox series

[for-2.10,1/4] bsd-user/mmap.c: Move __thread attribute to right place

Message ID 1500395194-21455-2-git-send-email-peter.maydell@linaro.org
State Accepted
Headers show
Series bsd-user: silence warnings on OpenBSD | expand

Commit Message

Peter Maydell July 18, 2017, 4:26 p.m. UTC
Avoid a compiler warning on OpenBSD:
bsd-user/mmap.c:28:1: warning: '__thread' is not at beginning of declaration [-Wold-style-declaration]
by moving the __thread attribute to its proper place.

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

---
 bsd-user/mmap.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.7.4

Comments

Philippe Mathieu-Daudé July 18, 2017, 4:45 p.m. UTC | #1
Reviewed-by: Philippe Mathieu-Daudé <f4bug@amsat.org>


Le 18 juil. 2017 1:29 PM, "Peter Maydell" <peter.maydell@linaro.org> a
écrit :

> Avoid a compiler warning on OpenBSD:

> bsd-user/mmap.c:28:1: warning: '__thread' is not at beginning of

> declaration [-Wold-style-declaration]

> by moving the __thread attribute to its proper place.

>

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

> ---

>  bsd-user/mmap.c | 2 +-

>  1 file changed, 1 insertion(+), 1 deletion(-)

>

> diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c

> index 7f2018e..20cd29d 100644

> --- a/bsd-user/mmap.c

> +++ b/bsd-user/mmap.c

> @@ -25,7 +25,7 @@

>  //#define DEBUG_MMAP

>

>  static pthread_mutex_t mmap_mutex = PTHREAD_MUTEX_INITIALIZER;

> -static int __thread mmap_lock_count;

> +static __thread int mmap_lock_count;

>

>  void mmap_lock(void)

>  {

> --

> 2.7.4

>

>

>
diff mbox series

Patch

diff --git a/bsd-user/mmap.c b/bsd-user/mmap.c
index 7f2018e..20cd29d 100644
--- a/bsd-user/mmap.c
+++ b/bsd-user/mmap.c
@@ -25,7 +25,7 @@ 
 //#define DEBUG_MMAP
 
 static pthread_mutex_t mmap_mutex = PTHREAD_MUTEX_INITIALIZER;
-static int __thread mmap_lock_count;
+static __thread int mmap_lock_count;
 
 void mmap_lock(void)
 {