From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 14097 invoked by alias); 20 Nov 2012 00:01:40 -0000 Received: (qmail 14070 invoked by uid 22791); 20 Nov 2012 00:01:39 -0000 X-SWARE-Spam-Status: No, hits=-4.0 required=5.0 tests=AWL,BAYES_00,KHOP_RCVD_UNTRUST,RCVD_IN_HOSTKARMA_W,RCVD_IN_HOSTKARMA_WL X-Spam-Check-By: sourceware.org Received: from relay1.mentorg.com (HELO relay1.mentorg.com) (192.94.38.131) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Tue, 20 Nov 2012 00:01:34 +0000 Received: from svr-orw-fem-01.mgc.mentorg.com ([147.34.98.93]) by relay1.mentorg.com with esmtp id 1TabHS-0000xF-1Z from joseph_myers@mentor.com for libc-ports@sourceware.org; Mon, 19 Nov 2012 16:01:34 -0800 Received: from SVR-IES-FEM-01.mgc.mentorg.com ([137.202.0.104]) by svr-orw-fem-01.mgc.mentorg.com over TLS secured channel with Microsoft SMTPSVC(6.0.3790.4675); Mon, 19 Nov 2012 16:01:33 -0800 Received: from digraph.polyomino.org.uk (137.202.0.76) by SVR-IES-FEM-01.mgc.mentorg.com (137.202.0.104) with Microsoft SMTP Server id 14.1.289.1; Tue, 20 Nov 2012 00:01:31 +0000 Received: from jsm28 (helo=localhost) by digraph.polyomino.org.uk with local-esmtp (Exim 4.76) (envelope-from ) id 1TabHO-0008P5-MA for libc-ports@sourceware.org; Tue, 20 Nov 2012 00:01:30 +0000 Date: Tue, 20 Nov 2012 00:01:00 -0000 From: "Joseph S. Myers" To: Subject: Fix unused-variable warnings from MIPS RESOLVE_GOTSYM macro Message-ID: MIME-Version: 1.0 Content-Type: text/plain; charset="US-ASCII" 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: 2012-11/txt/msg00071.txt.bz2 Building for MIPS produces warnings about the variable "version" in the RESOLVE_GOTSYM macro being unused when building dl-conflict.c, where RESOLVE_MAP is defined with a definition that doesn't use that macro argument. I've applied this patch to fix these warnings by using __attribute__ ((unused)) on that variable. 2012-11-19 Joseph Myers * sysdeps/mips/dl-machine.h (RESOLVE_GOTSYM): Declare VERSION variable with __attribute__ ((unused)). diff --git a/ports/sysdeps/mips/dl-machine.h b/ports/sysdeps/mips/dl-machine.h index cc7da76..9b970a2 100644 --- a/ports/sysdeps/mips/dl-machine.h +++ b/ports/sysdeps/mips/dl-machine.h @@ -637,7 +637,7 @@ elf_machine_got_rel (struct link_map *map, int lazy) #define RESOLVE_GOTSYM(sym,vernum,sym_index,reloc) \ ({ \ const ElfW(Sym) *ref = sym; \ - const struct r_found_version *version \ + const struct r_found_version *version __attribute__ ((unused)) \ = vernum ? &map->l_versions[vernum[sym_index] & 0x7fff] : NULL; \ struct link_map *sym_map; \ sym_map = RESOLVE_MAP (&ref, version, reloc); \ -- Joseph S. Myers joseph@codesourcery.com