Received: by 2002:a25:ad19:0:0:0:0:0 with SMTP id y25csp4082435ybi; Mon, 29 Jul 2019 18:52:53 -0700 (PDT) X-Google-Smtp-Source: APXvYqw1zvawSKFRQF16bzHp53PUwmseOA1va460jcMpBb7CuU1nWp9vfVBbxyXjfxVScwEtutE3 X-Received: by 2002:a63:60a:: with SMTP id 10mr75279107pgg.381.1564451573464; Mon, 29 Jul 2019 18:52:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1564451573; cv=none; d=google.com; s=arc-20160816; b=tV5laNNG0jggBt6IohE/My3LoDwmkerKyMC8h5EbNBiDNpAHo9gf+8uXzGost0TKrX W1OiL8ktuESxGKMnUBRS+kPqpXs1469MMw6CM5ZdQFhEOUhLRsB+UY9J/BaYkVy23dac ie2UjJsi/VUtQEBUFi9N71R9L/OzjSxVWk4u204Sxam8Yo08DZgIN4APlUExwtWHF669 xOLLjyJ63WjJKrvzzeamEyvRHgi2sRYA52ogzLaeLrrr1Gv8b2v2RQ+3rqx3CaE4hdCu fkLkykfMgIrGGugwfTSKuRvsrD/OLKz/qQ5qtsVVh4jPUPBeaJ3TiH4AtsKGHRNyEZbh 7XDg== 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 j14si35721460pgk.107.2019.07.29.18.52.38; Mon, 29 Jul 2019 18:52:53 -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 S2389646AbfG2Tq1 (ORCPT + 99 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 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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;