From cce01cf0a17e075204b8f2fae32900dda7211a71 Mon Sep 17 00:00:00 2001 From: Richard Henderson <rth@twiddle.net> Date: Fri, 26 Mar 2010 10:29:42 -0700 Subject: [PATCH] alpha: Avoid unused variable warnings with INTERNAL_SYSCALL_ERR*. Signed-off-by: Richard Henderson <rth@twiddle.net> --- ChangeLog.alpha | 5 +++++ sysdeps/unix/alpha/sysdep.h | 8 +++++--- 2 files changed, 10 insertions(+), 3 deletions(-) diff --git a/ChangeLog.alpha b/ChangeLog.alpha index 78ce8631a0..e4c4a6c473 100644 --- a/ChangeLog.alpha +++ b/ChangeLog.alpha @@ -1,3 +1,8 @@ +2010-03-26 Richard Henderson <rth@redhat.com> + + * sysdeps/unix/alpha/sysdep.h (INTERNAL_SYSCALL_ERROR_P, + INTERNAL_SYSCALL_ERRNO): "Use" the "other" variable in each macro. + 2010-03-26 Richard Henderson <rth@redhat.com> * sysdep/unix/sysv/linux/alpha/creat.c: New. diff --git a/sysdeps/unix/alpha/sysdep.h b/sysdeps/unix/alpha/sysdep.h index 2e5bc798eb..8accde0dc2 100644 --- a/sysdeps/unix/alpha/sysdep.h +++ b/sysdeps/unix/alpha/sysdep.h @@ -1,4 +1,4 @@ -/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004, 2006 +/* Copyright (C) 1992, 1995, 1996, 2000, 2003, 2004, 2006, 2010 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Brendan Kehoe (brendan@zen.org). @@ -191,8 +191,10 @@ __LABEL(name) \ }) #define INTERNAL_SYSCALL_DECL(err) long int err -#define INTERNAL_SYSCALL_ERROR_P(val, err) err -#define INTERNAL_SYSCALL_ERRNO(val, err) val +/* Make sure and "use" the variable that we're not returning, + in order to suppress unused variable warnings. */ +#define INTERNAL_SYSCALL_ERROR_P(val, err) ((void)val, err) +#define INTERNAL_SYSCALL_ERRNO(val, err) ((void)err, val) #define inline_syscall_clobbers \ "$1", "$2", "$3", "$4", "$5", "$6", "$7", "$8", \