From 3ab50b65b7380c65408cc7beba4aff22e267a2fe Mon Sep 17 00:00:00 2001 From: Christophe CURIS Date: Sun, 18 May 2014 00:56:46 +0200 Subject: [PATCH] WUtil: remove duplicated information from 'wassertr(v)' message The information about the File, Line and Function name that were included in the assertion message are already present from the 'wwarning' macro, so it is not necessary to include them in the macro's message. Signed-off-by: Christophe CURIS --- WINGs/WINGs/WUtil.h | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/WINGs/WINGs/WUtil.h b/WINGs/WINGs/WUtil.h index 01d03684..04e11975 100644 --- a/WINGs/WINGs/WUtil.h +++ b/WINGs/WINGs/WUtil.h @@ -40,15 +40,6 @@ #endif -#ifndef __ASSERT_FUNCTION -# if (!defined (__GNUC__) || (__GNUC__ < 2 && \ - __GNUC_MINOR__ < (defined (__cplusplus) ? 6 : 4))) -# define __ASSERT_FUNCTION ((char *) 0) -# else -# define __ASSERT_FUNCTION __PRETTY_FUNCTION__ -# endif -#endif - #ifndef __GNUC__ #define __attribute__(x) /*NOTHING*/ #endif @@ -65,15 +56,13 @@ #define wassertr(expr) \ if (!(expr)) { \ - wwarning("%s line %i (%s): assertion %s failed",\ - __FILE__, __LINE__, __ASSERT_FUNCTION, #expr);\ + wwarning("wassertr: assertion %s failed", #expr); \ return;\ } #define wassertrv(expr, val) \ if (!(expr)) { \ - wwarning("%s line %i (%s): assertion %s failed",\ - __FILE__, __LINE__, __ASSERT_FUNCTION, #expr);\ + wwarning("wassertrv: assertion %s failed", #expr); \ return (val);\ }