Received: by 2002:a05:6a10:a0d1:0:0:0:0 with SMTP id j17csp499514pxa; Wed, 19 Aug 2020 07:18:39 -0700 (PDT) X-Google-Smtp-Source: ABdhPJzTWihkXWVcX5UFpm756hQkgds60nmYYXDikmjgcM/9X+Mq2q3g03r3Kj55o08rJpUW/Dhh X-Received: by 2002:a17:906:413:: with SMTP id d19mr26613894eja.523.1597846719115; Wed, 19 Aug 2020 07:18:39 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1597846719; cv=none; d=google.com; s=arc-20160816; b=FcTrmdy3KA9wJktZi8Cu62ts+Q+Ols3mU6/hmBs5r8iozXwIYFnZtnDV1PZDoxVPBy lEOAv4J1B3KL76CVR22ZS/9gsO9+f1hU5BIPwWJt3X2eMMYjCfYGG6tk3nz2XIVqj0rW YMLpy3rMNgd/CiDXjW6Cbcz+BZ2dU73Hij/hj6nOHOlSlbiBUSRGUwLeiwMqziivIPwJ +Q6IHUIkkza9hjRGDXXskSHzc7IEHA0MxU+jq3njK4RyRGwZ5ekeLF4yP3WQ4RkWu29N 4fNMyeTztvd0gQSzixZYH9wd5CtUbf+4TCsTWXyXmL7EnI+LrCDbqpzxFpxHBOfdMg9e YFrA== 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 :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=LpH4evGkH7KWgaBBvlHGtpBc/Jd45m9WgGoNnryqofQ=; b=kBVRKx4Z8GdHjQlSHGj8ULAVUVqBWIk8x7JAk4hgMpBYQvCRIUTLHofzZ6qctt7CDT XrfvYL6iqbviUBRYncZRfrU4nN0qsKevxjLDqFeoiWbXvybe1p9g8JUjBigwcrGb+3OY KWKraZK9Pq7d8JnIymJEU090dqzCH8KYBCckI9b8hQIvlqa7+CFvcfGTPf8/IvpDhHSt v1X7svrfMglD6r2cFV4+RBhogOaWPCvLr+cgyq2wKSPasPub6AwmeRUaKMEXOz/HeWMW sFbyU7PO7vxubeAzUxPsiY9/v7uc1fXIXCIlfCBmTX91gU+y9cQPF4MyQ/l1R9NrTZIQ humg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="XKi/GbBN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id u1si1362297edd.388.2020.08.19.07.18.15; Wed, 19 Aug 2020 07:18:39 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="XKi/GbBN"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728370AbgHSOQq (ORCPT + 99 others); Wed, 19 Aug 2020 10:16:46 -0400 Received: from mail.kernel.org ([198.145.29.99]:36616 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726882AbgHSOQj (ORCPT ); Wed, 19 Aug 2020 10:16:39 -0400 Received: from localhost (unknown [213.57.247.131]) (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 AB0E82076E; Wed, 19 Aug 2020 14:16:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1597846599; bh=vTJUHVdF35cnboLxY4OxDfXFZrXo8IGxmY/aGjhnyJM=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=XKi/GbBN5RqAlPUl9kLaBnPLwd6i67sIOjkR/rjij9RIXaYtwmzGzdtYUspZOgk6f UgzyYXdRJly1tMaVpE5bq+VQyhEXTf4pdCYSEwRfqjWH9FoBSAHAnbmKXBlQjGbhKP cX/JGDjq8TnBD3spLj5MFlebOrlrW4N87sL3hbfs= From: Leon Romanovsky To: Chris Mason , David Sterba , Josef Bacik Cc: Leon Romanovsky , linux-btrfs@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH 1/3] fs/btfrs: Fix -Wunused-but-set-variable warnings Date: Wed, 19 Aug 2020 17:16:28 +0300 Message-Id: <20200819141630.1338693-2-leon@kernel.org> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200819141630.1338693-1-leon@kernel.org> References: <20200819141630.1338693-1-leon@kernel.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Leon Romanovsky The compilation with W=1 generates the following warnings: fs/btrfs/sysfs.c:1630:6: warning: variable 'ret' set but not used [-Wunused-but-set-variable] 1630 | int ret; | ^~~ fs/btrfs/sysfs.c:1629:6: warning: variable 'features' set but not used [-Wunused-but-set-variable] 1629 | u64 features; | ^~~~~~~~ Signed-off-by: Leon Romanovsky --- fs/btrfs/sysfs.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/fs/btrfs/sysfs.c b/fs/btrfs/sysfs.c index c8df2edafd85..d3652bcc2a86 100644 --- a/fs/btrfs/sysfs.c +++ b/fs/btrfs/sysfs.c @@ -1626,13 +1626,12 @@ void btrfs_sysfs_feature_update(struct btrfs_fs_info *fs_info, { struct btrfs_fs_devices *fs_devs; struct kobject *fsid_kobj; - u64 features; - int ret; + int __maybe_unused ret; if (!fs_info) return; - features = get_features(fs_info, set); + get_features(fs_info, set); ASSERT(bit & supported_feature_masks[set]); fs_devs = fs_info->fs_devices; -- 2.26.2