btrfs-progs: fix compiler warning

gcc 4.9.0 gives warnings about possibly uninitialized values when
compiling with function inlining and optimization level two enabled
(CFLAGS="-finline-functions -O2").

Initializing the values fixes the warning. Hope this is correct.

Signed-off-by: Christian Hesse <mail@eworm.de>
Signed-off-by: David Sterba <dsterba@suse.cz>
This commit is contained in:
Christian Hesse 2014-06-05 10:13:39 +02:00 committed by David Sterba
parent 3d0b0111df
commit 5676e94ad8
2 changed files with 2 additions and 2 deletions

View File

@ -427,7 +427,7 @@ int cmd_send(int argc, char **argv)
u32 i;
char *mount_root = NULL;
char *snapshot_parent = NULL;
u64 root_id;
u64 root_id = 0;
u64 parent_root_id = 0;
int full_send = 1;
int new_end_cmd_semantic = 0;

View File

@ -216,7 +216,7 @@ static int tlv_get_string(struct btrfs_send_stream *s, int attr, char **str)
{
int ret;
void *data;
int len;
int len = 0;
TLV_GET(s, attr, &data, &len);