[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: tls warnings on mingw
From: |
Bruno Haible |
Subject: |
Re: tls warnings on mingw |
Date: |
Wed, 18 Jun 2008 02:36:27 +0200 |
User-agent: |
KMail/1.5.4 |
Hi Eric,
> Even though the destructor is unused in mingw and single-threaded cases, can
> we
> at least evaluate it to avoid this warning?
>
> ../../gllib/strsignal.c:165: warning: 'free_key_mem' defined but not used
Makes sense. I've applied this.
2008-06-17 Bruno Haible <address@hidden>
* lib/tls.h (gl_tls_key_init): Evaluate the destructor argument also
when the macro ignores it.
Based on a patch by Eric Blake <address@hidden>.
*** lib/tls.h.orig 2008-06-18 02:01:06.000000000 +0200
--- lib/tls.h 2008-06-18 02:00:35.000000000 +0200
***************
*** 1,5 ****
/* Thread-local storage in multithreaded situations.
! Copyright (C) 2005, 2007 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
--- 1,5 ----
/* Thread-local storage in multithreaded situations.
! Copyright (C) 2005, 2007-2008 Free Software Foundation, Inc.
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
***************
*** 285,290 ****
--- 285,291 ----
{ \
if (((NAME) = TlsAlloc ()) == (DWORD)-1) \
abort (); \
+ (void) (DESTRUCTOR); \
} \
while (0)
# define gl_tls_get(NAME) \
***************
*** 320,326 ****
}
gl_tls_key_t;
# define gl_tls_key_init(NAME, DESTRUCTOR) \
! (NAME).singlethread_value = NULL
# define gl_tls_get(NAME) \
(NAME).singlethread_value
# define gl_tls_set(NAME, POINTER) \
--- 321,328 ----
}
gl_tls_key_t;
# define gl_tls_key_init(NAME, DESTRUCTOR) \
! ((NAME).singlethread_value = NULL, \
! (void) (DESTRUCTOR))
# define gl_tls_get(NAME) \
(NAME).singlethread_value
# define gl_tls_set(NAME, POINTER) \
- Re: lock, tls, and single-threaded applications, (continued)
- Re: lock, tls, and single-threaded applications, Bruno Haible, 2008/06/17
- Re: lock, tls, and single-threaded applications, Eric Blake, 2008/06/17
- Re: lock, tls, and single-threaded applications, Bruno Haible, 2008/06/18
- Re: lock, tls, and single-threaded applications, Jim Meyering, 2008/06/18
- Re: lock, tls, and single-threaded applications, Bruno Haible, 2008/06/18
Re: tls license, Bruno Haible, 2008/06/17
Re: lock warnings on mingw, Bruno Haible, 2008/06/17
Re: tls warnings on mingw,
Bruno Haible <=
[OT] VCS behavior [Re: strsignal on mingw], Eric Blake, 2008/06/18