1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-20 21:08:08 +01:00

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 <christophe.curis@free.fr>
This commit is contained in:
Christophe CURIS
2014-05-18 00:56:46 +02:00
committed by Carlos R. Mafra
parent 0350026866
commit 3ab50b65b7

View File

@@ -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);\
}