gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Use empty do-while loop as macro body...
authorChen Gang <gang.chen.5i5j@gmail.com>
Wed, 15 Apr 2015 15:29:12 +0000 (15:29 +0000)
committerJeff Law <law@gcc.gnu.org>
Wed, 15 Apr 2015 15:29:12 +0000 (09:29 -0600)
2015-04-15  Chen Gang  <gang.chen.5i5j@gmail.com>

       * gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Use empty
       do-while loop as macro body to avoid warnings.

From-SVN: r222127

libgcc/ChangeLog
libgcc/gthr-single.h

index 6fd8b8e0ca681dfe983bc6956b164adb4d483d16..611223ab645ea201f615493a6a49c74f838cb9d4 100644 (file)
@@ -1,3 +1,8 @@
+2015-04-15  Chen Gang  <gang.chen.5i5j@gmail.com>
+
+       * gthr-single.h (__GTHREAD_MUTEX_INIT_FUNCTION): Use empty
+       do-while loop as macro body to avoid warnings.
+
 2015-04-10  Jakub Jelinek  <jakub@redhat.com>
            Iain Sandoe  <iain@codesourcery.com>
 
index bddded4f24e7ef91f64189b29ca5734fe88373e9..00b3fd661bb74d7648c50f6849ad82dca3e77cf1 100644 (file)
@@ -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__))