aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYeongjong Lee <cleanlyj@naver.com>2018-10-22 11:04:21 +0200
committerXavi Artigas <xavierartigas@yahoo.es>2018-10-22 11:34:45 +0200
commit7f77938fa8f488305384e891ed2b0916c83d696d (patch)
tree71dda5527d2bd7f46ab55f2c9f5d95a406bcc0bb
parentMeson: set vieet as executable (diff)
downloadefl-7f77938fa8f488305384e891ed2b0916c83d696d.tar.gz
eina_lock: add empty do-while in macro
Summary: empty do-while is needed for safe use. This patch avoid empty body compiler warning. Problem case: if (b) EINA_MAIN_LOOP_CHECK_RETURN_VAL(NULL); Reviewers: segfaultxavi, Hermet, ManMower, bu5hm4n Reviewed By: segfaultxavi, bu5hm4n Subscribers: bu5hm4n, cedric, #reviewers, #committers Tags: #efl Differential Revision: https://phab.enlightenment.org/D7182
-rw-r--r--src/lib/eina/eina_lock.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/lib/eina/eina_lock.h b/src/lib/eina/eina_lock.h
index 80c2aa0667..752c19ad5c 100644
--- a/src/lib/eina/eina_lock.h
+++ b/src/lib/eina/eina_lock.h
@@ -642,12 +642,12 @@ static inline void eina_spinlock_free(Eina_Spinlock *spinlock);
* @brief Definition for the macro that doesn't do anything unless @c EINA_HAVE_DEBUG_THREADS is defined.
* @param[in] val The value to be returned
*/
-# define EINA_MAIN_LOOP_CHECK_RETURN_VAL(val)
+# define EINA_MAIN_LOOP_CHECK_RETURN_VAL(val) do {} while(0)
/**
* @def EINA_MAIN_LOOP_CHECK_RETURN
* @brief Definition for the macro that doesn't do anything unless @c EINA_HAVE_DEBUG_THREADS is defined.
*/
-# define EINA_MAIN_LOOP_CHECK_RETURN
+# define EINA_MAIN_LOOP_CHECK_RETURN do {} while(0)
#endif
/**