From patchwork Wed Oct 5 08:07:48 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tsutomu Itoh X-Patchwork-Id: 9362607 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 984D56077E for ; Wed, 5 Oct 2016 08:19:49 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 8B2E1284AF for ; Wed, 5 Oct 2016 08:19:49 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 7F06728621; Wed, 5 Oct 2016 08:19:49 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EBBB5284AF for ; Wed, 5 Oct 2016 08:19:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754637AbcJEITm (ORCPT ); Wed, 5 Oct 2016 04:19:42 -0400 Received: from mgwym01.jp.fujitsu.com ([211.128.242.40]:50988 "EHLO mgwym01.jp.fujitsu.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753070AbcJEITk (ORCPT ); Wed, 5 Oct 2016 04:19:40 -0400 X-Greylist: delayed 676 seconds by postgrey-1.27 at vger.kernel.org; Wed, 05 Oct 2016 04:19:40 EDT Received: from yt-mxoi2.gw.nic.fujitsu.com (unknown [192.168.229.69]) by mgwym01.jp.fujitsu.com with smtp id 5875_4305_7a345ab7_08e9_4195_862b_4c9f3add2b49; Wed, 05 Oct 2016 17:08:19 +0900 Received: from m3051.s.css.fujitsu.com (m3051.s.css.fujitsu.com [10.134.21.209]) by yt-mxoi2.gw.nic.fujitsu.com (Postfix) with ESMTP id 70283AC0132 for ; Wed, 5 Oct 2016 17:08:18 +0900 (JST) Received: from WIN-5MHF4RKU941.jp.fujitsu.com (unknown [10.124.102.163]) by m3051.s.css.fujitsu.com (Postfix) with SMTP id 50AB42C3 for ; Wed, 5 Oct 2016 17:08:18 +0900 (JST) X-SecurityPolicyCheck: OK by SHieldMailChecker v2.3.2 X-SHieldMailCheckerPolicyVersion: FJ-ISEC-20150223 X-SHieldMailCheckerMailID: 5b6ef1c9f7864c2c8241033828f7edce Message-Id: <201610050807.AA00000@WIN-5MHF4RKU941.jp.fujitsu.com> From: Tsutomu Itoh Date: Wed, 05 Oct 2016 17:07:48 +0900 To: linux-btrfs@vger.kernel.org Subject: [PATCH] btrfs-progs: image: fix compiler warning MIME-Version: 1.0 X-Mailer: AL-Mail32 Version 1.13 X-TM-AS-MML: disable Sender: linux-btrfs-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP In v4.8-rc1, gcc 5.3.1 gives following warning. Fixed it. [CC] btrfs-image.o btrfs-image.c: In function 'flush_pending': btrfs-image.c:708:17: warning: 'start' may be used uninitialized in this function [-Wmaybe-uninitialized] header->bytenr = cpu_to_le64(start); ^ btrfs-image.c:927:6: note: 'start' was declared here u64 start; ^ Signed-off-by: Tsutomu Itoh --- btrfs-image.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/btrfs-image.c b/btrfs-image.c index 0d410f8..47f36b9 100644 --- a/btrfs-image.c +++ b/btrfs-image.c @@ -924,7 +924,7 @@ static int flush_pending(struct metadump_struct *md, int done) struct async_work *async = NULL; struct extent_buffer *eb; u64 blocksize = md->root->nodesize; - u64 start; + u64 start = 0; u64 size; size_t offset; int ret = 0;