This is the mail archive of the
libc-alpha@sources.redhat.com
mailing list for the glibc project.
Silence TLS warnings
- From: "Alfred M. Szmidt" <ams at kemisten dot nu>
- To: libc-alpha at sources dot redhat dot com
- Date: Sat, 11 Sep 2004 23:21:07 +0200
- Subject: Silence TLS warnings
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>