[prev in list] [next in list] [prev in thread] [next in thread]
List: gcc-patches
Subject: [PATCH v3] libgcc: Use braces instead of macro's empty body to avoid xgcc warnings.
From: Chen Gang S <gang.chen () sunrus ! com ! cn>
Date: 2015-01-31 12:42:13
Message-ID: 54CCCDA5.2010600 () sunrus ! com ! cn
[Download RAW message or body]
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 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))
--
1.9.3
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic