This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Fix powerpc32 "set but not used" warnings from INTERNAL_SYSCALL_DECL
- From: "Joseph S. Myers" <joseph at codesourcery dot com>
- To: <libc-alpha at sourceware dot org>
- Cc: <ryan dot arnold at gmail dot com>
- Date: Tue, 4 Dec 2012 00:04:19 +0000
- Subject: Fix powerpc32 "set but not used" warnings from INTERNAL_SYSCALL_DECL
Building for powerpc32 produces large numbers of "set but not used"
warnings for variables declared with INTERNAL_SYSCALL_DECL, where the
combination of macros used ends up not checking anything stored in
that variable. As with other architectures that declare a variable
(rather than nothing) with this macro, it seems appropriate to avoid
these warnings by using __attribute__ ((unused)), which this patch
does.
2012-12-03 Joseph Myers <joseph@codesourcery.com>
* sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
(INTERNAL_SYSCALL_DECL): Use __attribute__ ((unused)).
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
index b0fa372..da25c01 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/sysdep.h
@@ -175,7 +175,7 @@
an error return status). */
# undef INTERNAL_SYSCALL_DECL
-# define INTERNAL_SYSCALL_DECL(err) long int err
+# define INTERNAL_SYSCALL_DECL(err) long int err __attribute__ ((unused))
# undef INTERNAL_SYSCALL
# define INTERNAL_SYSCALL_NCS(name, err, nr, args...) \
--
Joseph S. Myers
joseph@codesourcery.com