From patchwork Thu Jun 5 08:13:39 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christian Hesse X-Patchwork-Id: 4303971 Return-Path: X-Original-To: patchwork-linux-btrfs@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id DE5759F333 for ; Thu, 5 Jun 2014 08:14:12 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id 294B220306 for ; Thu, 5 Jun 2014 08:14:12 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id 3CEE9202E9 for ; Thu, 5 Jun 2014 08:14:10 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751320AbaFEIOF (ORCPT ); Thu, 5 Jun 2014 04:14:05 -0400 Received: from mx.mylinuxtime.de ([148.251.109.235]:59918 "EHLO mx.mylinuxtime.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751125AbaFEIOC (ORCPT ); Thu, 5 Jun 2014 04:14:02 -0400 Received: from leda.eworm.de (unknown [10.10.1.2]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx.mylinuxtime.de (Postfix) with ESMTPSA id 13A04226545; Thu, 5 Jun 2014 10:14:00 +0200 (CEST) Received: by leda.eworm.de (Postfix, from userid 1000) id BE15E1482D5; Thu, 5 Jun 2014 10:13:59 +0200 (CEST) From: Christian Hesse To: linux-btrfs@vger.kernel.org Cc: Christian Hesse Subject: [PATCH 1/1] btrfs-progs: fix compiler warning Date: Thu, 5 Jun 2014 10:13:39 +0200 Message-Id: <1401956019-2175-1-git-send-email-mail@eworm.de> X-Mailer: git-send-email 2.0.0 Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Spam-Status: No, score=-7.5 required=5.0 tests=BAYES_00, RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=ham version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- cmds-send.c | 2 +- send-stream.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/cmds-send.c b/cmds-send.c index 1cd457d..0c3e96b 100644 --- a/cmds-send.c +++ b/cmds-send.c @@ -416,7 +416,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; diff --git a/send-stream.c b/send-stream.c index 88e18e2..54edafe 100644 --- a/send-stream.c +++ b/send-stream.c @@ -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);