From 61271568fa5a8dd29868b8c97c779ef861a907c7 Mon Sep 17 00:00:00 2001 From: "Alfred E. Heggestad" <114750+alfredh@users.noreply.github.com> Date: Sun, 28 Apr 2024 10:48:14 +0200 Subject: [PATCH] fmt: use re_fprintf instead of DEBUG_WARNING to avoid deadlock --- src/fmt/print.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/fmt/print.c b/src/fmt/print.c index a02fb858b..040dd3aac 100644 --- a/src/fmt/print.c +++ b/src/fmt/print.c @@ -494,11 +494,12 @@ static int vhprintf(const char *fmt, va_list ap, re_vprintf_h *vph, void *arg, out: #ifndef RELEASE if (err == ENODATA) { - DEBUG_WARNING("Format: \"%b<-- NO ARG\n", fmt, p - fmt + 1); + re_fprintf(stderr, "Format: \"%b<-- NO ARG\n", + fmt, p - fmt + 1); re_assert(0 && "RE_VA_ARG: no more arguments"); } if (err == EOVERFLOW) { - DEBUG_WARNING("Format: \"%b<-- SIZE ERROR\n", fmt, + re_fprintf(stderr, "Format: \"%b<-- SIZE ERROR\n", fmt, p - fmt + 1); re_assert(0 && "RE_VA_ARG: arg is not compatible"); }