mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 19:19:32 +03:00
Fix maybe uninitialized
As of gcc 5.1.1 20150618 (Red Hat 5.1.1-4) the -Werror=maybe-uninitialized check detects that 'snapname' in recv_incremental_replication() may not be initialized. Explicitly initialize the variable to resolved the warning. libzfs_sendrecv.c: In function ‘recv_incremental_replication’: libzfs_sendrecv.c:2019:2: error: ‘snapname’ may be used uninitialized in (void) snprintf(buf, sizeof (buf), "%s@%s", fsname, snapname); Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
parent
b23d54305a
commit
98401d2361
@ -2003,7 +2003,7 @@ created_before(libzfs_handle_t *hdl, avl_tree_t *avl,
|
|||||||
uint64_t guid1, uint64_t guid2)
|
uint64_t guid1, uint64_t guid2)
|
||||||
{
|
{
|
||||||
nvlist_t *nvfs;
|
nvlist_t *nvfs;
|
||||||
char *fsname, *snapname;
|
char *fsname = NULL, *snapname = NULL;
|
||||||
char buf[ZFS_MAXNAMELEN];
|
char buf[ZFS_MAXNAMELEN];
|
||||||
int rv;
|
int rv;
|
||||||
zfs_handle_t *guid1hdl, *guid2hdl;
|
zfs_handle_t *guid1hdl, *guid2hdl;
|
||||||
|
Loading…
Reference in New Issue
Block a user