diff options
author | Brian Behlendorf <[email protected]> | 2022-06-20 21:54:42 +0000 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2022-06-27 14:19:31 -0700 |
commit | f11431a31776734722e14bd6186b93a25823a0ee (patch) | |
tree | a449a095ce6715a89d2518aa0857ba3a5ac1e4dc | |
parent | c175f5ebb2f4910e2d4f38f794e3973e53baa94e (diff) |
Fix -Wformat-truncation warning in upgrade_set_callback()
Extend the buffer slightly resolve the warning.
cmd/zfs/zfs_main.c: In function ‘upgrade_set_callback’:
cmd/zfs/zfs_main.c:2446:22: error: ‘%llu’ directive output
may be truncated writing between 1 and 20 bytes into a
region of size 16 [-Werror=format-truncation=]
cmd/zfs/zfs_main.c:2445:24: note: ‘snprintf’ output between
2 and 21 bytes into a destination of size 16
Reviewed-by: Ryan Moeller <[email protected]>
Reviewed-by: Alexander Motin <[email protected]>
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #13528
Closes #13575
-rw-r--r-- | cmd/zfs/zfs_main.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 3cb88b6a1..e29dfa57d 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -2441,7 +2441,7 @@ upgrade_set_callback(zfs_handle_t *zhp, void *data) /* upgrade */ if (version < cb->cb_version) { - char verstr[16]; + char verstr[24]; (void) snprintf(verstr, sizeof (verstr), "%llu", (u_longlong_t)cb->cb_version); if (cb->cb_lastfs[0] && !same_pool(zhp, cb->cb_lastfs)) { |