Commit 0691204a authored by Cedric Roux's avatar Cedric Roux
Browse files

- Use maximum available integer for assertions parameters display

git-svn-id: http://svn.eurecom.fr/openair4G/trunk@4680 818b1a75-f10b-46b9-bf7c-635c3b92a50f
parent f91b1671
......@@ -31,14 +31,16 @@
#define ASSERTIONS_H_
#include <stdio.h>
#include <stdint.h>
#include <inttypes.h>
#define DevCheck(cOND, vALUE1, vALUE2, vALUE3) \
do { \
if (!(cOND)) { \
fprintf(stderr, "%s:%d:%s Assertion `"#cOND"` failed.\n", \
__FILE__, __LINE__, __FUNCTION__); \
fprintf(stderr, #vALUE1": %d\n"#vALUE2": %d\n"#vALUE3": %d\n", \
(int)vALUE1, (int)vALUE2, (int)vALUE3); \
fprintf(stderr, #vALUE1": %"PRIdMAX"\n"#vALUE2": %"PRIdMAX"\n"#vALUE3": %"PRIdMAX"\n", \
(intmax_t)vALUE1, (intmax_t)vALUE2, (intmax_t)vALUE3); \
abort(); \
} \
} while(0)
......@@ -48,9 +50,9 @@ do { \
if (!(cOND)) { \
fprintf(stderr, "%s:%d:%s\nAssertion `"#cOND"` failed.\n", \
__FILE__, __LINE__, __FUNCTION__); \
fprintf(stderr, #vALUE1": %d\n"#vALUE2": %d\n"#vALUE3": %d\n" \
#vALUE4": %d\n", \
(int)vALUE1, (int)vALUE2, (int)vALUE3, (int)vALUE4); \
fprintf(stderr, #vALUE1": %"PRIdMAX"\n"#vALUE2": %"PRIdMAX"\n"#vALUE3": %"PRIdMAX"\n" \
#vALUE4": %"PRIdMAX"\n", \
(intmax_t)vALUE1, (intmax_t)vALUE2, (intmax_t)vALUE3, (intmax_t)vALUE4); \
exit(EXIT_FAILURE); \
} \
} while(0)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment