forked from enlightenment/efl
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
This commit is contained in:
parent
fabfd2334e
commit
7f77938fa8
|
@ -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
|
||||
|
||||
/**
|
||||
|
|
Loading…
Reference in New Issue