diff options
author | Mike Frysinger <vapier@gentoo.org> | 2013-03-11 01:22:12 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2013-03-12 06:01:38 -0400 |
commit | 4fdd5ec1257f6a5a7bc629febaaef0209c17ea05 (patch) | |
tree | 849060973f676de012878167657127e9410fd8e1 /ports/sysdeps/unix/sysv/linux/ia64/sysdep.h | |
parent | a186dc916c30e5077e092335e6c264d9d18688df (diff) | |
download | glibc-4fdd5ec1257f6a5a7bc629febaaef0209c17ea05.tar.gz glibc-4fdd5ec1257f6a5a7bc629febaaef0209c17ea05.tar.xz glibc-4fdd5ec1257f6a5a7bc629febaaef0209c17ea05.zip |
ia64: fix set-but-unused warnings with syscalls
These macros often set up a variable that later macros sometimes do not use. Add unused attribute to avoid that. Similarly, the ia64 code tends to check the err field rather than the val (which is opposite of most arches) leading to the same kind of warning. Replace this with a dummy reference. Signed-off-by: Mike Frysinger <vapier@gentoo.org>
Diffstat (limited to 'ports/sysdeps/unix/sysv/linux/ia64/sysdep.h')
-rw-r--r-- | ports/sysdeps/unix/sysv/linux/ia64/sysdep.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/ports/sysdeps/unix/sysv/linux/ia64/sysdep.h b/ports/sysdeps/unix/sysv/linux/ia64/sysdep.h index c6fce1313e..96f6a4e8a5 100644 --- a/ports/sysdeps/unix/sysv/linux/ia64/sysdep.h +++ b/ports/sysdeps/unix/sysv/linux/ia64/sysdep.h @@ -252,7 +252,7 @@ _retval; }) #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...) \ @@ -264,7 +264,10 @@ INTERNAL_SYSCALL_NCS (__NR_##name, err, nr, ##args) #undef INTERNAL_SYSCALL_ERROR_P -#define INTERNAL_SYSCALL_ERROR_P(val, err) (err == -1) +#define INTERNAL_SYSCALL_ERROR_P(val, err) \ + ({ (void) (val); \ + (err == -1); \ + }) #undef INTERNAL_SYSCALL_ERRNO #define INTERNAL_SYSCALL_ERRNO(val, err) (val) |