git: d4b59682cbb4 - main - fusefs: Fix a warning in a test

From: Warner Losh <imp_at_FreeBSD.org>
Date: Sun, 17 Aug 2025 17:13:54 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=d4b59682cbb415f160f8084949128d51b8a5c3a7

commit d4b59682cbb415f160f8084949128d51b8a5c3a7
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2025-08-17 16:37:23 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2025-08-17 17:13:42 +0000

    fusefs: Fix a warning in a test
    
    ints can be up to 10 digits, plus NUL. Make the val array 12 to silences
    a lame gcc warning (the range of the int is such that we'll never
    truncate, but this is a cheap fix).
    
    Sponsored by:           Netflix
---
 tests/sys/fs/fusefs/mockfs.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/sys/fs/fusefs/mockfs.cc b/tests/sys/fs/fusefs/mockfs.cc
index 65cdc3919652..e8081dea9604 100644
--- a/tests/sys/fs/fusefs/mockfs.cc
+++ b/tests/sys/fs/fusefs/mockfs.cc
@@ -472,7 +472,7 @@ MockFS::MockFS(int max_read, int max_readahead, bool allow_other,
 	sprintf(fdstr, "%d", m_fuse_fd);
 	build_iovec(&iov, &iovlen, "fd", fdstr, -1);
 	if (m_maxread > 0) {
-		char val[10];
+		char val[12];
 
 		snprintf(val, sizeof(val), "%d", m_maxread);
 		build_iovec(&iov, &iovlen, "max_read=", &val, -1);