summaryrefslogtreecommitdiffstats
path: root/src/opt.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2024-07-28 10:47:59 -0400
committerTavian Barnes <tavianator@tavianator.com>2024-07-28 10:54:34 -0400
commit26f3c379c1603ebdc35d1653b677b9e22685fd81 (patch)
tree7767d85b72bd46fe5bd8de772c453f0654fb780a /src/opt.c
parenta12c4dbf12f5dff559abc4464b905842031696da (diff)
downloadbfs-26f3c379c1603ebdc35d1653b677b9e22685fd81.tar.xz
prelude: Simplify attributes
Diffstat (limited to 'src/opt.c')
-rw-r--r--src/opt.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/opt.c b/src/opt.c
index d81b7d8..ccd76c8 100644
--- a/src/opt.c
+++ b/src/opt.c
@@ -370,7 +370,7 @@ struct bfs_opt {
};
/** Log an optimization. */
-attr(printf(2, 3))
+_printf(2, 3)
static bool opt_debug(struct bfs_opt *opt, const char *format, ...) {
if (bfs_debug_prefix(opt->ctx, DEBUG_OPT)) {
for (int i = 0; i < opt->depth; ++i) {
@@ -388,7 +388,7 @@ static bool opt_debug(struct bfs_opt *opt, const char *format, ...) {
}
/** Log a recursive call. */
-attr(printf(2, 3))
+_printf(2, 3)
static bool opt_enter(struct bfs_opt *opt, const char *format, ...) {
int depth = opt->depth;
if (depth > 0) {
@@ -408,7 +408,7 @@ static bool opt_enter(struct bfs_opt *opt, const char *format, ...) {
}
/** Log a recursive return. */
-attr(printf(2, 3))
+_printf(2, 3)
static bool opt_leave(struct bfs_opt *opt, const char *format, ...) {
bool debug = false;
int depth = opt->depth;
@@ -432,7 +432,7 @@ static bool opt_leave(struct bfs_opt *opt, const char *format, ...) {
}
/** Log a shallow visit. */
-attr(printf(2, 3))
+_printf(2, 3)
static bool opt_visit(struct bfs_opt *opt, const char *format, ...) {
int depth = opt->depth;
if (depth > 0) {
@@ -452,7 +452,7 @@ static bool opt_visit(struct bfs_opt *opt, const char *format, ...) {
}
/** Log the deletion of an expression. */
-attr(printf(2, 3))
+_printf(2, 3)
static bool opt_delete(struct bfs_opt *opt, const char *format, ...) {
int depth = opt->depth;
@@ -614,7 +614,7 @@ static bool is_const(const struct bfs_expr *expr) {
}
/** Warn about an expression. */
-attr(printf(3, 4))
+_printf(3, 4)
static void opt_warning(const struct bfs_opt *opt, const struct bfs_expr *expr, const char *format, ...) {
if (!opt->warn) {
return;