Silence TLS warnings
Alfred M. Szmidt
ams@kemisten.nu
Sat Sep 11 21:21:00 GMT 2004
The following patch silences a bunch of annoying warnings when
compiling glibc for GNU/Hurd with TLS support.
../sysdeps/mach/hurd/i386/tls.h: In function `_hurd_tls_init':
../sysdeps/mach/hurd/i386/tls.h:71: warning: left-hand operand of comma expression has no effect
../sysdeps/mach/hurd/i386/tls.h:71: warning: left-hand operand of comma expression has no effect
../sysdeps/mach/hurd/i386/tls.h:71: warning: left-hand operand of comma expression has no effect
../sysdeps/mach/hurd/i386/tls.h:102: warning: left-hand operand of comma expression has no effect
../sysdeps/mach/hurd/i386/tls.h:102: warning: left-hand operand of comma expression has no effect
../sysdeps/mach/hurd/i386/tls.h:102: warning: left-hand operand of comma expression has no effect
Index: ChangeLog
from Alfred M. Szmidt <ams@kemisten.nu>
* sysdeps/mach/hurd/i386/tls.h (__i386_set_gdt) [!HAVE_I386_SET_GDT]:
Cast THR, SEL and DESC to `void'.
Index: sysdeps/mach/hurd/i386/tls.h
===================================================================
RCS file: /cvs/glibc/libc/sysdeps/mach/hurd/i386/tls.h,v
retrieving revision 1.5
diff -u -r1.5 tls.h
--- sysdeps/mach/hurd/i386/tls.h 3 Sep 2004 20:49:00 -0000 1.5
+++ sysdeps/mach/hurd/i386/tls.h 11 Sep 2004 21:19:13 -0000
@@ -39,7 +39,7 @@
# include <mach/i386/mach_i386.h>
# ifndef HAVE_I386_SET_GDT
-# define __i386_set_gdt(thr, sel, desc) ((thr), (sel), (desc), MIG_BAD_ID)
+# define __i386_set_gdt(thr, sel, desc) ((void) (thr), (void) (sel), (void) (desc), MIG_BAD_ID)
# endif
# include <errno.h>
More information about the Libc-alpha
mailing list