summaryrefslogtreecommitdiffstats
path: root/src/opt.c
diff options
context:
space:
mode:
authorTavian Barnes <tavianator@tavianator.com>2025-06-25 13:59:15 -0400
committerTavian Barnes <tavianator@tavianator.com>2025-07-26 14:19:51 -0400
commit2cd69d3ee34a6d2c21aa64aedf262827eb83826f (patch)
tree9e98b40ac2a7fc6809f7e2bb3ac0c42eecad735a /src/opt.c
parent1b1e5a4707d681e4b38df56e83db1be9c07723b8 (diff)
downloadbfs-2cd69d3ee34a6d2c21aa64aedf262827eb83826f.tar.xz
Use C23 [[attribute]] syntax
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 9094794..0b2837f 100644
--- a/src/opt.c
+++ b/src/opt.c
@@ -374,7 +374,7 @@ struct bfs_opt {
};
/** Log an optimization. */
-_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) {
@@ -392,7 +392,7 @@ static bool opt_debug(struct bfs_opt *opt, const char *format, ...) {
}
/** Log a recursive call. */
-_printf(2, 3)
+[[_printf(2, 3)]]
static bool opt_enter(struct bfs_opt *opt, const char *format, ...) {
int depth = opt->depth;
if (depth > 0) {
@@ -412,7 +412,7 @@ static bool opt_enter(struct bfs_opt *opt, const char *format, ...) {
}
/** Log a recursive return. */
-_printf(2, 3)
+[[_printf(2, 3)]]
static bool opt_leave(struct bfs_opt *opt, const char *format, ...) {
bool debug = false;
int depth = opt->depth;
@@ -436,7 +436,7 @@ static bool opt_leave(struct bfs_opt *opt, const char *format, ...) {
}
/** Log a shallow visit. */
-_printf(2, 3)
+[[_printf(2, 3)]]
static bool opt_visit(struct bfs_opt *opt, const char *format, ...) {
int depth = opt->depth;
if (depth > 0) {
@@ -456,7 +456,7 @@ static bool opt_visit(struct bfs_opt *opt, const char *format, ...) {
}
/** Log the deletion of an expression. */
-_printf(2, 3)
+[[_printf(2, 3)]]
static bool opt_delete(struct bfs_opt *opt, const char *format, ...) {
int depth = opt->depth;
@@ -618,7 +618,7 @@ static bool is_const(const struct bfs_expr *expr) {
}
/** Warn about an expression. */
-_printf(3, 4)
+[[_printf(3, 4)]]
static bool opt_warning(const struct bfs_opt *opt, const struct bfs_expr *expr, const char *format, ...) {
if (!opt->warn) {
return false;