From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 784 invoked by alias); 11 Mar 2013 03:02:17 -0000 Received: (qmail 773 invoked by uid 22791); 11 Mar 2013 03:02:17 -0000 X-SWARE-Spam-Status: No, hits=-6.4 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_DNSWL_HI,RCVD_IN_HOSTKARMA_W,RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from smtp.gentoo.org (HELO smtp.gentoo.org) (140.211.166.183) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Mon, 11 Mar 2013 03:02:10 +0000 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.gentoo.org (Postfix) with ESMTP id B661B33D3D2 for ; Mon, 11 Mar 2013 03:02:09 +0000 (UTC) From: Mike Frysinger To: libc-ports@sourceware.org Subject: [PATCH] ia64: fix set-but-unused warnings with syscalls Date: Mon, 11 Mar 2013 03:02:00 -0000 Message-Id: <1362971082-22765-1-git-send-email-vapier@gentoo.org> X-IsSubscribed: yes Mailing-List: contact libc-ports-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Post: List-Help: , Sender: libc-ports-owner@sourceware.org X-SW-Source: 2013-03/txt/msg00084.txt.bz2 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 --- ports/sysdeps/unix/sysv/linux/ia64/sysdep.h | 7 +++++-- 1 file 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 c6fce13..96f6a4e 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) -- 1.8.1.2