From 9e2af376dd368ddb79ade1244833e609ea1fecdf Mon Sep 17 00:00:00 2001 From: "Aaron W. LaFramboise" Date: Sun, 31 Aug 2008 12:26:48 -0600 Subject: gthr-win32.h (__gthread_setspecific): Use CONST_CAST2. 2008-08-31 Aaron W. LaFramboise * gcc/gthr-win32.h (__gthread_setspecific): Use CONST_CAST2. From-SVN: r139839 --- gcc/config/i386/gthr-win32.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'gcc/config/i386/gthr-win32.c') diff --git a/gcc/config/i386/gthr-win32.c b/gcc/config/i386/gthr-win32.c index 3810fc0..666a936 100644 --- a/gcc/config/i386/gthr-win32.c +++ b/gcc/config/i386/gthr-win32.c @@ -141,7 +141,10 @@ __gthr_win32_getspecific (__gthread_key_t key) int __gthr_win32_setspecific (__gthread_key_t key, const void *ptr) { - return (TlsSetValue (key, (void*) ptr) != 0) ? 0 : (int) GetLastError (); + if (TlsSetValue (key, CONST_CAST2(void *, const void *, ptr)) != 0) + return 0; + else + return GetLastError (); } void -- cgit v1.1