From: Chen Gang S <gang.chen@sunrus.com.cn>
To: ian@airs.com, Jakub Jelinek <jakub@redhat.com>
Cc: "walt@tilera.com" <walt@tilera.com>, Jeff Law <law@redhat.com>,
gcc-patches List <gcc-patches@gcc.gnu.org>
Subject: [PATCH v2] libgcc: Use braces instead of macro's empty body to avoid xgcc warnings.
Date: Sat, 31 Jan 2015 11:33:00 -0000 [thread overview]
Message-ID: <54CC7085.1080805@sunrus.com.cn> (raw)
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 <gang.chen.5i5j@gmail.com>
* gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Use braces
instead of macro's empty body to avoid xgcc warnings.
---
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))
--
1.9.3
next reply other threads:[~2015-01-31 5:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-31 11:33 Chen Gang S [this message]
2015-01-31 12:34 ` Andreas Schwab
2015-01-31 14:50 ` Chen Gang S
2015-01-31 15:45 ` Prathamesh Kulkarni
2015-01-31 15:45 ` Marek Polacek
2015-01-31 19:51 ` Chen Gang S
2015-04-14 5:30 ` Jeff Law
2015-04-15 15:29 Jeff Law
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=54CC7085.1080805@sunrus.com.cn \
--to=gang.chen@sunrus.com.cn \
--cc=gcc-patches@gcc.gnu.org \
--cc=ian@airs.com \
--cc=jakub@redhat.com \
--cc=law@redhat.com \
--cc=walt@tilera.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).