HomeFreeBSD

Fix -Wformat-truncation warning in upgrade_set_callback()

Description

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

Details

Provenance
Brian Behlendorf <behlendorf1@llnl.gov>Authored on Jun 20 2022, 9:54 PM
Parents
rGc175f5ebb2f4: Fix -Wuse-after-free warning in dbuf_destroy()
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rGf11431a31776: Fix -Wformat-truncation warning in upgrade_set_callback() (authored by Brian Behlendorf <behlendorf1@llnl.gov>).Jun 27 2022, 9:19 PM