mirror of
https://github.com/gryf/wmaker.git
synced 2026-10-06 09:20:34 +02: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:
1 parent
0350026866
commit
3ab50b65b7
1 file changed
+2
-13
+2
-13
@@ -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);\
|
||||
}
|
||||
|
||||
|
||||
Reference in new issue
Block a user