linux-mips
[Top] [All Lists]

[PATCH 4/4] MIPS: Fix GCC-4.6 'set but not used' warning in arch/mips/mm

To: linux-mips@linux-mips.org, ralf@linux-mips.org
Subject: [PATCH 4/4] MIPS: Fix GCC-4.6 'set but not used' warning in arch/mips/mm/init.c
From: David Daney <ddaney@caviumnetworks.com>
Date: Mon, 24 Jan 2011 14:51:37 -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
Under some combinations of CONFIG_*, lastpfn in page_is_ram is 'set
but not used'.  Mark it as __maybe_unused to quiet the warning/error.

Signed-off-by: David Daney <ddaney@caviumnetworks.com>
---
 arch/mips/mm/init.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/arch/mips/mm/init.c b/arch/mips/mm/init.c
index dff6421..0d4046c 100644
--- a/arch/mips/mm/init.c
+++ b/arch/mips/mm/init.c
@@ -329,7 +329,7 @@ int page_is_ram(unsigned long pagenr)
 void __init paging_init(void)
 {
        unsigned long max_zone_pfns[MAX_NR_ZONES];
-       unsigned long lastpfn;
+       unsigned long lastpfn __maybe_unused;
 
        pagetable_init();
 
-- 
1.7.2.3


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