diff options
author | Tavian Barnes <tavianator@tavianator.com> | 2023-11-09 15:29:04 -0500 |
---|---|---|
committer | Tavian Barnes <tavianator@tavianator.com> | 2023-11-09 15:35:03 -0500 |
commit | b5b1e98a66aef5b64409e3d02149733bf3f475fb (patch) | |
tree | 552d32ceeca5adee2569dc0c0e86c85de26b0383 /src/printf.c | |
parent | ffa465b759204272a5e94d851ce3696c827e9d96 (diff) | |
download | bfs-b5b1e98a66aef5b64409e3d02149733bf3f475fb.tar.xz |
config: Remove BFS_SUPPRESS()
Diffstat (limited to 'src/printf.c')
-rw-r--r-- | src/printf.c | 18 |
1 files changed, 14 insertions, 4 deletions
diff --git a/src/printf.c b/src/printf.c index 704e26d..02ca586 100644 --- a/src/printf.c +++ b/src/printf.c @@ -83,9 +83,14 @@ static int dyn_fprintf(FILE *file, const struct bfs_printf *directive, ...) { va_list args; va_start(args, directive); - BFS_SUPPRESS("-Wformat-nonliteral"); +#if __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wformat-nonliteral" +#endif int ret = vfprintf(file, directive->str, args); - BFS_UNSUPPRESS(); +#if __GNUC__ +# pragma GCC diagnostic pop +#endif va_end(args); return ret; @@ -183,9 +188,14 @@ static int bfs_printf_strftime(CFILE *cfile, const struct bfs_printf *directive, // POSIX strftime() features default: format[1] = directive->c; - BFS_SUPPRESS("-Wformat-nonliteral"); +#if __GNUC__ +# pragma GCC diagnostic push +# pragma GCC diagnostic ignored "-Wformat-nonliteral" +#endif ret = strftime(buf, sizeof(buf), format, &tm); - BFS_UNSUPPRESS(); +#if __GNUC__ +# pragma GCC diagnostic pop +#endif break; } |