aboutsummaryrefslogtreecommitdiffstats
path: root/test.c
diff options
context:
space:
mode:
authorMattias Andrée <maandree@kth.se>2022-06-11 16:37:09 +0200
committerMattias Andrée <maandree@kth.se>2022-06-11 16:37:09 +0200
commitfcfe59c1f2219408ac2a9cd84b386816ff252221 (patch)
tree0f46c009babfba2d0200ece3ecce067c548a66b6 /test.c
parentRemove `static` from some `static inline` (diff)
downloadlibsimple-fcfe59c1f2219408ac2a9cd84b386816ff252221.tar.gz
libsimple-fcfe59c1f2219408ac2a9cd84b386816ff252221.tar.bz2
libsimple-fcfe59c1f2219408ac2a9cd84b386816ff252221.tar.xz
Fix warnings, replace some static inline with inline + extern inline, and fix glibc support
Diffstat (limited to 'test.c')
-rw-r--r--test.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/test.c b/test.c
index e5ecf00..29a501b 100644
--- a/test.c
+++ b/test.c
@@ -159,7 +159,7 @@ realloc(void *ptr, size_t size)
return malloc(size);
ret = malloc(size);
if (!ret)
- return malloc;
+ return NULL;
info = get_allocinfo(ret);
n = MIN(size, info->size);
info->zeroed = MIN(n, info->zeroed);
@@ -347,7 +347,7 @@ test_vfprintf(FILE *restrict stream, const char *restrict format, va_list ap)
n = (size_t)r;
alloc_fail_in = 0;
assert((buf = malloc(n + 1)));
- n = vsnprintf(buf, n + 1, format, ap);
+ n = (size_t)vsnprintf(buf, n + 1, format, ap);
if (fileno(stream) != STDERR_FILENO || stderr_real) {
fwrite(buf, 1, n, stream);
} else {