linux-mips
[Top] [All Lists]

[PATCH 3/4] MIPS: Fix GCC-4.6 'set but not used' warning in ieee754int.h

To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH 3/4] MIPS: Fix GCC-4.6 'set but not used' warning in ieee754int.h
From: David Daney <ddaney@caviumnetworks.com>
Date: Mon, 24 Jan 2011 14:51:36 -0800
Cc: David Daney <ddaney@caviumnetworks.com>
In-reply-to: <1295909497-23317-1-git-send-email-ddaney@caviumnetworks.com>
Original-recipient: rfc822;linux-mips@linux-mips.org
References: <1295909497-23317-1-git-send-email-ddaney@caviumnetworks.com>
Sender: linux-mips-bounce@linux-mips.org
GCC-4.6 can find more unused code than previous versions could.

In the case of arch/mips/math-emu/ieee754int.h, the COMPXSP and
COMPXDP macros are used in several places, but a couple of them leave
xs unused.  The easiest thing to do is mark it as __maybe_unused to
quiet the warning.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
 arch/mips/math-emu/ieee754int.h |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/mips/math-emu/ieee754int.h b/arch/mips/math-emu/ieee754int.h
index 2701d95..2a7d43f 100644
--- a/arch/mips/math-emu/ieee754int.h
+++ b/arch/mips/math-emu/ieee754int.h
@@ -70,7 +70,7 @@
 
 
 #define COMPXSP \
-  unsigned xm; int xe; int xs; int xc
+  unsigned xm; int xe; int xs __maybe_unused; int xc
 
 #define COMPYSP \
   unsigned ym; int ye; int ys; int yc
@@ -104,7 +104,7 @@
 
 
 #define COMPXDP \
-u64 xm; int xe; int xs; int xc
+u64 xm; int xe; int xs __maybe_unused; int xc
 
 #define COMPYDP \
 u64 ym; int ye; int ys; int yc
-- 
1.7.2.3


<Prev in Thread] Current Thread [Next in Thread>