diff options
| author | David Lamparter <equinox@diac24.net> | 2021-03-26 18:11:21 +0100 |
|---|---|---|
| committer | David Lamparter <equinox@diac24.net> | 2021-03-30 22:32:59 +0200 |
| commit | cb4928ce77c089ae521301776ed90e994c29800c (patch) | |
| tree | 3e595e3b458c3abed63c485eac59cfb229fdb3a7 /tests/lib/test_printfrr.c | |
| parent | 2d9a4e2931e4f20c6bc49b09956a1e350664e3f2 (diff) | |
lib: add `FMT_NSTD()` for non-standard printf exts
... to suppress the warnings when using something that isn't quite ISO C
compatible and would otherwise cause compiler warnings from `-Wformat`.
Signed-off-by: David Lamparter <equinox@diac24.net>
Diffstat (limited to 'tests/lib/test_printfrr.c')
| -rw-r--r-- | tests/lib/test_printfrr.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/lib/test_printfrr.c b/tests/lib/test_printfrr.c index 6d64615faf..5a8d10e9b7 100644 --- a/tests/lib/test_printfrr.c +++ b/tests/lib/test_printfrr.c @@ -59,8 +59,8 @@ static void printcmp(const char *fmt, ...) errors++; } -static void printchk(const char *ref, const char *fmt, ...) PRINTFRR(2, 3); -static void printchk(const char *ref, const char *fmt, ...) +static int printchk(const char *ref, const char *fmt, ...) PRINTFRR(2, 3); +static int printchk(const char *ref, const char *fmt, ...) { va_list ap; char bufrr[256]; @@ -125,6 +125,7 @@ static void printchk(const char *ref, const char *fmt, ...) (int)(outpos[i].off_end - outpos[i].off_start), bufrr + outpos[i].off_start); printf("\n"); + return 0; } int main(int argc, char **argv) |
