From 488cee2b1db20e53f5c124950d05c5ca85b81500 Mon Sep 17 00:00:00 2001
From: Xin LI <delphij@FreeBSD.org>
Date: Sat, 24 Sep 2022 21:09:52 -0700
Subject: [PATCH] file.c: Explicitly cast 'nextchar' to wint_t for printf(3).

%lc expects an wint_t parameter, while 'nextchar' is wchar_t.
This causes build issues for some FreeBSD platforms.
---
 src/file.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/file.c b/src/file.c
index cb9845a7..4250abbf 100644
--- a/src/file.c
+++ b/src/file.c
@@ -593,7 +593,7 @@ fname_print(const char *inname)
 		inname += bytesconsumed;
 		n -= bytesconsumed;
 		if (iswprint(nextchar)) {
-			printf("%lc", nextchar);
+			printf("%lc", (wint_t)nextchar);
 			continue;
 		}
 		/* XXX: What if it is > 255? */
-- 
2.37.3

