fix warnings introduced by changes in _Assert_Exit_ macro

This commit is contained in:
Bruno Mongazon-Cazavet
2023-02-23 09:56:24 +01:00
parent fcc41355ea
commit 9db78ab4d6
9 changed files with 26 additions and 19 deletions
+13 -12
View File
@@ -30,19 +30,20 @@
#include <platform_types.h>
#include "backtrace.h"
#define EXIT_NORMAL 0
#define EXIT_ASSERT 1
#define OAI_EXIT_NORMAL 0
#define OAI_EXIT_ASSERT 1
#define _Assert_Exit_ \
if (getenv("gdbStacks")) { \
char tmp[1000]; \
sprintf(tmp, "gdb -ex='set confirm off' -ex 'thread apply all bt' -ex q -p %d < /dev/null", getpid()); \
__attribute__((unused)) int dummy = system(tmp); \
} \
fprintf(stderr, "\nExiting execution\n"); \
fflush(stdout); \
fflush(stderr); \
exit_function(__FILE__, __FUNCTION__, __LINE__, "_Assert_Exit_", EXIT_ASSERT);
#define _Assert_Exit_ \
if (getenv("gdbStacks")) { \
char tmp [1000]; \
sprintf(tmp,"gdb -ex='set confirm off' -ex 'thread apply all bt' -ex q -p %d < /dev/null", getpid()); \
__attribute__((unused)) int dummy=system(tmp); \
} \
fprintf(stderr, "\nExiting execution\n"); \
fflush(stdout); \
fflush(stderr); \
exit_function(__FILE__, __FUNCTION__, __LINE__, "_Assert_Exit_", OAI_EXIT_ASSERT); \
abort(); // to avoid gcc warnings - never executed unless app-specific exit_function() does not exit() nor abort()
#define _Assert_(cOND, aCTION, fORMAT, aRGS...) \
do { \