This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]