git: 3c98498fb58e - main - editors/hexcurse: fix build on 14.1
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 16 Jun 2024 15:25:27 UTC
The branch main has been updated by pkubaj:
URL: https://cgit.FreeBSD.org/ports/commit/?id=3c98498fb58e4de076a3862cc459be6ca10e3445
commit 3c98498fb58e4de076a3862cc459be6ca10e3445
Author: Piotr Kubaj <pkubaj@FreeBSD.org>
AuthorDate: 2024-06-15 15:09:31 +0000
Commit: Piotr Kubaj <pkubaj@FreeBSD.org>
CommitDate: 2024-06-16 15:25:19 +0000
editors/hexcurse: fix build on 14.1
hexcurse.c:237:30: error: 'snprintf' will always be truncated; specified size is 1, but format string expands to at least 2 [-Werror,-Wformat-truncation]
237 | min_address_length = snprintf(buffer, 1, "%jd", (intmax_t)len);
| ^
1 error generated.
---
editors/hexcurse/Makefile | 2 ++
1 file changed, 2 insertions(+)
diff --git a/editors/hexcurse/Makefile b/editors/hexcurse/Makefile
index d0d3987e0c81..bbc423bc50c7 100644
--- a/editors/hexcurse/Makefile
+++ b/editors/hexcurse/Makefile
@@ -26,4 +26,6 @@ PLIST_FILES= bin/hexcurse share/man/man1/hexcurse.1.gz
CFLAGS+= -Wno-error=deprecated-non-prototype
.endif
+CFLAGS+= -Wno-error=format-truncation
+
.include <bsd.port.post.mk>