Author: cazfi Date: Sat Apr 16 09:43:15 2016 New Revision: 32419 URL: http://svn.gna.org/viewcvs/freeciv?rev=32419&view=rev Log: Disable all fc_assert_XXX() effects when NDEBUG is defined.
Patch by pepeto <pepeto> and myself See patch #5696 Modified: trunk/utility/log.h Modified: trunk/utility/log.h URL: http://svn.gna.org/viewcvs/freeciv/trunk/utility/log.h?rev=32419&r1=32418&r2=32419&view=diff ============================================================================== --- trunk/utility/log.h (original) +++ trunk/utility/log.h Sat Apr 16 09:43:15 2016 @@ -157,6 +157,14 @@ /* Disabled. */ #define fc_assert(...) (void) 0 #define fc_assert_msg(...) (void) 0 +#define fc_assert_action(...) (void) 0 +#define fc_assert_ret(...) (void) 0 +#define fc_assert_ret_val(...) (void) 0 +#define fc_assert_exit(...) (void) 0 +#define fc_assert_action_msg(...) (void) 0 +#define fc_assert_ret_msg(...) (void) 0 +#define fc_assert_ret_val_msg(...) (void) 0 +#define fc_assert_exit_msg(...) (void) 0 #else /* Like assert(). */ #define fc_assert(condition) \ @@ -168,7 +176,6 @@ ((condition) ? (void) 0 \ : fc_assert_fail(__FILE__, __FUNCTION__, __FC_LINE__, \ #condition, message, ## __VA_ARGS__)) -#endif /* FREECIV_NDEBUG */ /* Do action on failure. */ #define fc_assert_action(condition, action) \ @@ -198,6 +205,7 @@ #define fc_assert_exit_msg(condition, message, ...) \ fc_assert_action(condition, \ log_fatal(message, ## __VA_ARGS__); exit(EXIT_FAILURE)) +#endif /* FREECIV_NDEBUG */ #ifdef __cplusplus #ifdef FREECIV_CXX11_STATIC_ASSERT _______________________________________________ Freeciv-commits mailing list Freeciv-commits@gna.org https://mail.gna.org/listinfo/freeciv-commits