From: Bruno Haible Date: Wed, 18 Jun 2008 00:06:26 +0000 (+0200) Subject: Avoid unused value warnings. X-Git-Tag: v0.1~7254 X-Git-Url: http://erislabs.org.uk/gitweb/?a=commitdiff_plain;h=64eaf93aeee250c7a6a57465ce1cd05fb8d31530;p=gnulib.git Avoid unused value warnings. --- diff --git a/ChangeLog b/ChangeLog index 059e847ad..e6f31b88a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,11 @@ 2008-06-17 Bruno Haible + * lib/tls.h (gl_tls_key_init): Evaluate the destructor argument also + when the macro ignores it. + Based on a patch by Eric Blake . + +2008-06-17 Bruno Haible + * modules/tls (License): Change to LGPLv2+. Reported by Eric Blake. diff --git a/lib/tls.h b/lib/tls.h index 09faadeec..9b195063d 100644 --- a/lib/tls.h +++ b/lib/tls.h @@ -1,5 +1,5 @@ /* Thread-local storage in multithreaded situations. - Copyright (C) 2005, 2007 Free Software Foundation, Inc. + 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,6 +285,7 @@ typedef DWORD gl_tls_key_t; { \ if (((NAME) = TlsAlloc ()) == (DWORD)-1) \ abort (); \ + (void) (DESTRUCTOR); \ } \ while (0) # define gl_tls_get(NAME) \ @@ -320,7 +321,8 @@ typedef struct } gl_tls_key_t; # define gl_tls_key_init(NAME, DESTRUCTOR) \ - (NAME).singlethread_value = NULL + ((NAME).singlethread_value = NULL, \ + (void) (DESTRUCTOR)) # define gl_tls_get(NAME) \ (NAME).singlethread_value # define gl_tls_set(NAME, POINTER) \