From patchwork Fri Mar 1 11:41:43 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: James Greenhalgh X-Patchwork-Id: 224290 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id C1E3B2C02A0 for ; Fri, 1 Mar 2013 22:42:05 +1100 (EST) Comment: DKIM? See http://www.dkim.org DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d=gcc.gnu.org; s=default; x=1362742926; h=Comment: DomainKey-Signature:Received:Received:Received:Received:Received: From:To:Cc:Subject:Date:Message-Id:MIME-Version:Content-Type: Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive: List-Post:List-Help:Sender:Delivered-To; bh=mX0o4+WExS6r2oB/IOkV fRmNUbY=; b=VwM7NaW8ED+pwhK2vo/UF6/chxk/gLWFGxkH5T1CQ2lO3ozhH2pu ctCZ3jtaQcK7EG66RRWKLSNTQYTlxAdNDF3AgAvtPJOV7taUcRR9OFPjO8DwA1Sl hxyMRZs63/Xw+TQXLzbGOhITK+01aRwiTnJRxpJTLO90/OThy0GmMIA= Comment: DomainKeys? See http://antispam.yahoo.com/domainkeys DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=default; d=gcc.gnu.org; h=Received:Received:X-SWARE-Spam-Status:X-Spam-Check-By:Received:Received:Received:From:To:Cc:Subject:Date:Message-Id:MIME-Version:X-MC-Unique:Content-Type:X-IsSubscribed:Mailing-List:Precedence:List-Id:List-Unsubscribe:List-Archive:List-Post:List-Help:Sender:Delivered-To; b=rBMt8YkidA85SWOwfP07DXvt7I7wFZ5iiZo4CXriuZZe/Mu73vDtGdE6ejzGG+ JXquwcPkJhdtmUjvPB5rEI1PP3PGIZbykD6FfZmkFgUanmvlotmdtiQlDHcZ+BYq lWo1AQVDnWz/chtG57qYR0VHXVg5/Dr07iANT0vmmGxnU=; Received: (qmail 1973 invoked by alias); 1 Mar 2013 11:41:56 -0000 Received: (qmail 1878 invoked by uid 22791); 1 Mar 2013 11:41:55 -0000 X-SWARE-Spam-Status: No, hits=-2.0 required=5.0 tests=AWL, BAYES_00, KHOP_RCVD_UNTRUST, KHOP_SPAMHAUS_DROP, RCVD_IN_DNSWL_LOW X-Spam-Check-By: sourceware.org Received: from service87.mimecast.com (HELO service87.mimecast.com) (91.220.42.44) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Fri, 01 Mar 2013 11:41:50 +0000 Received: from cam-owa2.Emea.Arm.com (fw-tnat.cambridge.arm.com [217.140.96.21]) by service87.mimecast.com; Fri, 01 Mar 2013 11:41:48 +0000 Received: from e106375-lin.cambridge.arm.com ([10.1.255.212]) by cam-owa2.Emea.Arm.com with Microsoft SMTPSVC(6.0.3790.3959); Fri, 1 Mar 2013 11:41:49 +0000 From: James Greenhalgh To: gcc-patches@gcc.gnu.org Cc: marcus-shawcroft@arm.com Subject: [AArch64/AArch64-4.7][libgcc] Silence warnings in sync-cache.c Date: Fri, 1 Mar 2013 11:41:43 +0000 Message-Id: <1362138103-10354-1-git-send-email-james.greenhalgh@arm.com> MIME-Version: 1.0 X-MC-Unique: 113030111414809201 X-IsSubscribed: yes Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org Hi, On trunk and 4.7 __aarch64_sync_cache_range gives a missing prototype warning and two "statement with no effect" warnings as so: --- .../libgcc/config/aarch64/sync-cache.c:22:1: warning: no previous prototype for '__aarch64_sync_cache_range' [-Wmissing-prototypes] __aarch64_sync_cache_range (const void *base, const void *end) ^ .../libgcc/config/aarch64/sync-cache.c: In function '__aarch64_sync_cache_range': /work/oban-clean/src/gcc/libgcc/config/aarch64/sync-cache.c:46:3: warning: statement with no effect [-Wunused-value] for (address; address < (const char *) end; address += dcache_lsize) ^ .../libgcc/config/aarch64/sync-cache.c:58:3: warning: statement with no effect [-Wunused-value] for (address; address < (const char *) end; address += icache_lsize) --- This patch silences these warnings by declaring a prototype for aarch64_sync_cache_range and removing the no-op for loop initialisation Regression tested on aarch64-none-linux-gnu with no issues. OK for trunk/aarch64-4.7-branch? Thanks, James Greenhalgh --- libgcc/ 2013-03-01 James Greenhalgh * config/aarch64/sync-cache.c (__aarch64_sync_cache_range): Silence warnings. diff --git a/libgcc/config/aarch64/sync-cache.c b/libgcc/config/aarch64/sync-cache.c index 7091c48..3397e9d 100644 --- a/libgcc/config/aarch64/sync-cache.c +++ b/libgcc/config/aarch64/sync-cache.c @@ -18,6 +18,8 @@ along with GCC; see the file COPYING3. If not see . */ +void __aarch64_sync_cache_range (const void *, const void *); + void __aarch64_sync_cache_range (const void *base, const void *end) { @@ -43,7 +45,7 @@ __aarch64_sync_cache_range (const void *base, const void *end) address = (const char*) ((__UINTPTR_TYPE__) base & ~ (__UINTPTR_TYPE__) (dcache_lsize - 1)); - for (address; address < (const char *) end; address += dcache_lsize) + for (; address < (const char *) end; address += dcache_lsize) asm volatile ("dc\tcvau, %0" : : "r" (address) @@ -55,7 +57,7 @@ __aarch64_sync_cache_range (const void *base, const void *end) address = (const char*) ((__UINTPTR_TYPE__) base & ~ (__UINTPTR_TYPE__) (icache_lsize - 1)); - for (address; address < (const char *) end; address += icache_lsize) + for (; address < (const char *) end; address += icache_lsize) asm volatile ("ic\tivau, %0" : : "r" (address)