From patchwork Mon Sep 11 10:40:34 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Qu Wenruo X-Patchwork-Id: 13380221 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 01E5DCA0ECD for ; Mon, 11 Sep 2023 22:06:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1355661AbjIKWBo (ORCPT ); Mon, 11 Sep 2023 18:01:44 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:58928 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236458AbjIKKlF (ORCPT ); Mon, 11 Sep 2023 06:41:05 -0400 Received: from smtp-out2.suse.de (smtp-out2.suse.de [195.135.220.29]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 57F60E5F for ; Mon, 11 Sep 2023 03:41:01 -0700 (PDT) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out2.suse.de (Postfix) with ESMTPS id 11C301F891 for ; Mon, 11 Sep 2023 10:41:00 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.com; s=susede1; t=1694428860; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=/u0O6wJRRN0Lir/nQV5QzKGbQ+scNzscwAUT0zubgfU=; b=nSAf2DIznjmiPCIJwEb4SMa3V1INSn50zzagLUT8W32eyY04XXYR5T+KGPgPer4IpXJVof GfWRC6KLVikIq5SgXHEdo47DtJllgjFDnnOtXntnDPnFwssoeNdJt75viZhFR0jCz4a9rV M7POLva3dbi57qBZPaQVMkDFTnABBT4= Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 0C3DA13780 for ; Mon, 11 Sep 2023 10:40:58 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id qIxfKrru/mQPTwAAMHmgww (envelope-from ) for ; Mon, 11 Sep 2023 10:40:58 +0000 From: Qu Wenruo To: linux-btrfs@vger.kernel.org Subject: [PATCH 3/3] btrfs-progs: enable -Wshadow for default build Date: Mon, 11 Sep 2023 20:10:34 +0930 Message-ID: <5a97e0bcbf28f018ce9cf30106b4c5142d2c5299.1694428549.git.wqu@suse.com> X-Mailer: git-send-email 2.42.0 In-Reply-To: References: MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-btrfs@vger.kernel.org With all the known one fixed, we can enable -Wshadow now. Signed-off-by: Qu Wenruo --- Makefile | 3 ++- Makefile.extrawarn | 1 - 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 8cd5674616be..e178b7e13777 100644 --- a/Makefile +++ b/Makefile @@ -86,7 +86,8 @@ DISABLE_WARNING_FLAGS := $(call cc-disable-warning, format-truncation) \ # Warnings that we want by default ENABLE_WARNING_FLAGS := $(call cc-option, -Wimplicit-fallthrough) \ - $(call cc-option, -Wmissing-prototypes) + $(call cc-option, -Wmissing-prototypes) \ + -Wshadow ASFLAGS = diff --git a/Makefile.extrawarn b/Makefile.extrawarn index 9cd279171e57..44bc8cff188f 100644 --- a/Makefile.extrawarn +++ b/Makefile.extrawarn @@ -60,7 +60,6 @@ warning-2 := -Waggregate-return warning-2 += -Wcast-align warning-2 += -Wdisabled-optimization warning-2 += -Wnested-externs -warning-2 += -Wshadow warning-2 += $(call cc-option, -Wlogical-op) warning-2 += $(call cc-option, -Wmissing-field-initializers) warning-2 += $(call cc-option, -Wformat-truncation)