mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-25 18:59:33 +03:00
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 <ryan@iXsystems.com> Reviewed-by: Alexander Motin <mav@FreeBSD.org> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #13528 Closes #13575
This commit is contained in:
parent
c175f5ebb2
commit
f11431a317
@ -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)) {
|
||||
|
Loading…
Reference in New Issue
Block a user