From patchwork Sat Jan 31 12:42:13 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Chen Gang X-Patchwork-Id: 435124 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]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id A4C881402CF for ; Sat, 31 Jan 2015 23:35:13 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type :content-transfer-encoding; q=dns; s=default; b=L6RK18E+M0/AF24+ Hi/xd6n7ICu+kNSJzy45sO6XayGYvsrKDWhGjxIA67Q9xzShuw1pWYkOTpxvHlga 4UBAPssvsOQdmiwN2pQSRbDhYaY07GkS5RYkEeZH4qLwEKmLxvq7O/PAzXJ8mopw 4g2dM6Wc7Ufhum/Lripp4oT9Ipc= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=gcc.gnu.org; h=list-id :list-unsubscribe:list-archive:list-post:list-help:sender :message-id:date:from:mime-version:to:cc:subject:content-type :content-transfer-encoding; s=default; bh=6IVEEoe7Z3KBb6qxgqHfA7 9xkGw=; b=ry/u66imFaCuNOlEMqEsk1kSttqwBbtF+Pap0sWZlZOc8NyGXk5QzZ hDvBzNTH55ar8TYKRRNZvwfny0a6wQ795eA22YUbhYqMnC7Rxh25dQz86syskDZi gPZoCXrByp8GA3d+T7SFUJxgX1ndM42AImTGQGSBpckibNmYQiW7o= Received: (qmail 27636 invoked by alias); 31 Jan 2015 12:34:44 -0000 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 Received: (qmail 27627 invoked by uid 89); 31 Jan 2015 12:34:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, SPF_PASS, UNPARSEABLE_RELAY autolearn=ham version=3.3.2 X-HELO: out1134-211.mail.aliyun.com Received: from out1134-211.mail.aliyun.com (HELO out1134-211.mail.aliyun.com) (42.120.134.211) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Sat, 31 Jan 2015 12:34:40 +0000 X-Alimail-AntiSpam: AC=CONTINUE; BC=0.3944701|-1; FP=7312479637612694682|1|1|4|0|-1|-1|-1; HT=r46d02008; MF=gang.chen@sunrus.com.cn; PH=DS; RN=8; RT=8; SR=0; Received: from ShengShiZhuChengdeMacBook-Pro.local(mailfrom:gang.chen@sunrus.com.cn ip:223.72.65.40) by smtp.aliyun-inc.com(10.194.100.109); Sat, 31 Jan 2015 20:34:29 +0800 Message-ID: <54CCCDA5.2010600@sunrus.com.cn> Date: Sat, 31 Jan 2015 20:42:13 +0800 From: Chen Gang S User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:31.0) Gecko/20100101 Thunderbird/31.4.0 MIME-Version: 1.0 To: Marek Polacek , Prathamesh Kulkarni , Andreas Schwab , Ian Lance Taylor , Jakub Jelinek CC: "walt@tilera.com" , Jeff Law , gcc-patches List Subject: [PATCH v3] libgcc: Use braces instead of macro's empty body to avoid xgcc warnings. The related warning (cross compile tile with --disable-threads): ../../../../gcc-tile-new/libgcc/libgcov-interface.c: In function '__gcov_fork': ../../../../gcc-tile-new/libgcc/libgcov-interface.c:182:53: warning: suggest braces around empty body in an 'if' statement [-Wempty-body] __GTHREAD_MUTEX_INIT_FUNCTION (&__gcov_flush_mx); ^ 2015-01-31 Chen Gang * gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Use empty do- while loop as macro body. --- libgcc/gthr-single.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libgcc/gthr-single.h b/libgcc/gthr-single.h index f084fe2..01366f53 100644 --- a/libgcc/gthr-single.h +++ b/libgcc/gthr-single.h @@ -35,7 +35,7 @@ typedef int __gthread_recursive_mutex_t; #define __GTHREAD_ONCE_INIT 0 #define __GTHREAD_MUTEX_INIT 0 -#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) +#define __GTHREAD_MUTEX_INIT_FUNCTION(mx) do {} while (0) #define __GTHREAD_RECURSIVE_MUTEX_INIT 0 #define UNUSED __attribute__((unused))