From patchwork Mon Jul 29 19:19:59 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Greg KH X-Patchwork-Id: 170028 Delivered-To: patch@linaro.org Received: by 2002:a92:512:0:0:0:0:0 with SMTP id q18csp1670926ile; Mon, 29 Jul 2019 12:46:29 -0700 (PDT) X-Google-Smtp-Source: APXvYqxePhcOswjmf96kuFB+34dy2W1x8wmc8RMWglOJz4vdj1/gzXvTvzMux7rSJh+Eb9J6ea1E X-Received: by 2002:a17:90a:c58e:: with SMTP id l14mr112860790pjt.104.1564429589732; Mon, 29 Jul 2019 12:46:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564429589; cv=none; d=google.com; s=arc-20160816; b=VU/nNTgRlExsXIldF6kwThMBeyqJcNgdwyV48aqHP30U9nA1yhy39O9mP3CTXLtGlV jR9ZOgAVLNPvciDhheLA1efBBKpdvHzeeEQ4f/iRF61N74VwCfmA7+jtmQe5i4jmNFj3 avQ6R0sYUopOGL14i18ZlZQ/7AEsBRkPgOACHD++xiQZuipwhFrVgA3crB9AXJ0UawVd fFsE6UIvQz91C35OpP7Q18e7GGGr2agWPheU/gq6O9rt2/cTo4CALm/JnJTfcIBK76kH QfUbXs4atr1u5F39ITVIHC3J4dhQafRvwhuVEwr4iBL0B7954iV7sywN/3vs+kqxk+nj WJ1w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=8KCPiAWmr6tJGaqvsowBqC/zw395PNFkPWO/olXHhq4=; b=eezzZj00NqpdPAElX73GTZwLIPyiqTn0UDtnQPSH4ym5tGta+zUe/xvKJVVQhxaCH7 MMfisGiV6K2QHhrouBx9TcicTA17massAZC9vqc3OWMVJS7f4xTmqZ5Y1vvLuhUJD7ol WPYdm/oP4YdWyDmU0cwOt+zqf5P7/Ww5aJ1yT4HdMJtFiD3lc8fpOglhWkdt3BDDVKMn 0GfF21Ox98mU2/rXN/KUxRLyM4qLlfwfUZ1BHaeH1csTFBjUCNzsc3MuhQHyuv/1CWQF IdCROiSrxwaMRbF20spB05+P85OfJl20+TwHVf9OpUf0ahZ+s/s6ymKjhHL89SLREQNi 2k1w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JN5bQkNM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id o14si31426141pgk.45.2019.07.29.12.46.29; Mon, 29 Jul 2019 12:46:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=JN5bQkNM; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2390178AbfG2Tq1 (ORCPT + 29 others); Mon, 29 Jul 2019 15:46:27 -0400 Received: from mail.kernel.org ([198.145.29.99]:35692 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2389627AbfG2TqZ (ORCPT ); Mon, 29 Jul 2019 15:46:25 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id E7A3F217D7; Mon, 29 Jul 2019 19:46:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1564429584; bh=3N7p1PM00csEyJLS9KFJaSXdvGKRGzUML6K5QMs3g8w=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=JN5bQkNMVIjDdseKsNfoJiTLpdeDYrDSdAQybnliHKR7cmybrsO0tm2I00hD9Zlb4 d1OYFCTctnPbOscnNIjmVNJNY1mYUYiv0ar4kXqb/lI6Ay3U8ND1QO+pPp0tzr9RsR CpqUu+KMZ9P4j9Z8SMnsbThhpnxTfuA0flpV6mlg= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Arnd Bergmann , David Sterba Subject: [PATCH 5.2 003/215] btrfs: shut up bogus -Wmaybe-uninitialized warning Date: Mon, 29 Jul 2019 21:19:59 +0200 Message-Id: <20190729190740.374967721@linuxfoundation.org> X-Mailer: git-send-email 2.22.0 In-Reply-To: <20190729190739.971253303@linuxfoundation.org> References: <20190729190739.971253303@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Arnd Bergmann commit 6c64460cdc8be5fa074aa8fe2ae8736d5792bdc5 upstream. gcc sometimes can't determine whether a variable has been initialized when both the initialization and the use are conditional: fs/btrfs/props.c: In function 'inherit_props': fs/btrfs/props.c:389:4: error: 'num_bytes' may be used uninitialized in this function [-Werror=maybe-uninitialized] btrfs_block_rsv_release(fs_info, trans->block_rsv, This code is fine. Unfortunately, I cannot think of a good way to rephrase it in a way that makes gcc understand this, so I add a bogus initialization the way one should not. Signed-off-by: Arnd Bergmann Reviewed-by: David Sterba [ gcc 8 and 9 don't emit the warning ] Signed-off-by: David Sterba Signed-off-by: Greg Kroah-Hartman --- fs/btrfs/props.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/btrfs/props.c +++ b/fs/btrfs/props.c @@ -337,7 +337,7 @@ static int inherit_props(struct btrfs_tr for (i = 0; i < ARRAY_SIZE(prop_handlers); i++) { const struct prop_handler *h = &prop_handlers[i]; const char *value; - u64 num_bytes; + u64 num_bytes = 0; if (!h->inheritable) continue;