projects
/
gnulib.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix a warning in last patch.
[gnulib.git]
/
tests
/
test-vsnprintf-posix.c
diff --git
a/tests/test-vsnprintf-posix.c
b/tests/test-vsnprintf-posix.c
index
052cd72
..
6e7f5d3
100644
(file)
--- a/
tests/test-vsnprintf-posix.c
+++ b/
tests/test-vsnprintf-posix.c
@@
-25,11
+25,22
@@
#include <stdarg.h>
#include <stddef.h>
#include <stdarg.h>
#include <stddef.h>
+#include <stdio.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
-#define ASSERT(expr) if (!(expr)) abort ();
+#define SIZEOF(array) (sizeof (array) / sizeof (array[0]))
+#define ASSERT(expr) \
+ do \
+ { \
+ if (!(expr)) \
+ { \
+ fprintf (stderr, "%s:%d: assertion failed\n", __FILE__, __LINE__); \
+ abort (); \
+ } \
+ } \
+ while (0)
static int
my_snprintf (char *str, size_t size, const char *format, ...)
static int
my_snprintf (char *str, size_t size, const char *format, ...)