Received: by 10.223.176.5 with SMTP id f5csp3126703wra; Mon, 29 Jan 2018 09:09:55 -0800 (PST) X-Google-Smtp-Source: AH8x2250TLYqaryJr0glaB3l9Rua7tYtaczhPC2B13n8R5o73Ic7Tqym3YbSEhZ7BB3elvikYjY0 X-Received: by 10.99.179.77 with SMTP id x13mr20444443pgt.135.1517245795525; Mon, 29 Jan 2018 09:09:55 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1517245795; cv=none; d=google.com; s=arc-20160816; b=lEJ48N7GlwoIhFcUxsvleB2jqedO6UVyXpR2J3w6TeHmQpfh/OaXRqHFtCBJaBRcuf fv96OAv4LL7pZBujHh79Duxr1vJmHLKpwmzpMelLBlFaGeGWePXdGiCkYFN5UWfFXlSR 3P2Wfw985TfHj82jQCzTjI4bYWIglD43LPCP+tyIuQVn6wR9wocH6F8LlR1wBis+mMdt 189dLCn79ZontEV4+5FyCjTYCs9Mb1M0rqA1xVkBdwxsGCIU8VLuPCefhlt0s/8roBFW aVg9kZOS9vfEhg3LAlmL/g3zEzbObb9sywHTl5nTJ2HrF68v7B5XxuTIABc3rCIpXCXy YnpA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dmarc-filter:dkim-signature:dkim-signature :arc-authentication-results; bh=G+ZffefsntWlkSP04JYF0F32lXHbbg29cfU1Eq1fik8=; b=MRuQoxqtiP1zwA5UnSja9OSgKXwVqSxY+lfPiG5QrV69jwxIml3/Ystkgio3n6O/tu al7Q6Q+xATKO6dzZEnVqmGz6cHViq91cFfS1Yk80OCDLkq1W8nFSoPsVJm+7jb58MHer /iaMGKd+jLYfTbLf+qveac66pn8Hlb1H3syEgtNmyihZIfLxjW3k6DtJ5ZnEx8ARs82c GRiZC64OBP2nM//CYRgGbYh6/gYyUXdzxluSKlZr9uw8eu9Y/gkvB6I0Hd+qz+uKZcok gwJVci4j8ORi+2hJOpSZEOwJOGhQDFBopCc4Pd3TiMGRYL3LZTaNHLqEs3wppnWd9Tmn mwzg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@codeaurora.org header.s=default header.b=OYNT1Nz6; dkim=pass header.i=@codeaurora.org header.s=default header.b=OYNT1Nz6; 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 a14si7666852pgu.361.2018.01.29.09.09.35; Mon, 29 Jan 2018 09:09:55 -0800 (PST) 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=@codeaurora.org header.s=default header.b=OYNT1Nz6; dkim=pass header.i=@codeaurora.org header.s=default header.b=OYNT1Nz6; 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 S1751878AbeA2RIN (ORCPT + 99 others); Mon, 29 Jan 2018 12:08:13 -0500 Received: from smtp.codeaurora.org ([198.145.29.96]:49722 "EHLO smtp.codeaurora.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751338AbeA2RIL (ORCPT ); Mon, 29 Jan 2018 12:08:11 -0500 Received: by smtp.codeaurora.org (Postfix, from userid 1000) id BB0EC609D1; Mon, 29 Jan 2018 17:08:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1517245690; bh=bZT5POkbV152Qk/cmi/esh9sZnoXpvJtTVHnz/2Dj5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OYNT1Nz6x2yV3C5AuH1gLEzmR/15r0y9c9CmBD6UZtkMY8vcGkzMPdpQyUiKe7Cpw vwugxwaGwkfdwACASB/IzWUaY+xA4/g/zaCRUFn4LBLJgIkgsuaeKlt1g3poPzdUQT fYjnuaAwvOpTZe33Nxif1hojtUKKhviNWQtLv9og= X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on pdx-caf-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.8 required=2.0 tests=ALL_TRUSTED,BAYES_00, DKIM_SIGNED,T_DKIM_INVALID autolearn=no autolearn_force=no version=3.4.0 Received: from psodagud-linux1.qualcomm.com (i-global254.qualcomm.com [199.106.103.254]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-SHA256 (128/128 bits)) (No client certificate requested) (Authenticated sender: psodagud@smtp.codeaurora.org) by smtp.codeaurora.org (Postfix) with ESMTPSA id EA67B60592; Mon, 29 Jan 2018 17:08:09 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=codeaurora.org; s=default; t=1517245690; bh=bZT5POkbV152Qk/cmi/esh9sZnoXpvJtTVHnz/2Dj5I=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=OYNT1Nz6x2yV3C5AuH1gLEzmR/15r0y9c9CmBD6UZtkMY8vcGkzMPdpQyUiKe7Cpw vwugxwaGwkfdwACASB/IzWUaY+xA4/g/zaCRUFn4LBLJgIkgsuaeKlt1g3poPzdUQT fYjnuaAwvOpTZe33Nxif1hojtUKKhviNWQtLv9og= DMARC-Filter: OpenDMARC Filter v1.3.2 smtp.codeaurora.org EA67B60592 Authentication-Results: pdx-caf-mail.web.codeaurora.org; dmarc=none (p=none dis=none) header.from=codeaurora.org Authentication-Results: pdx-caf-mail.web.codeaurora.org; spf=none smtp.mailfrom=psodagud@codeaurora.org From: Prasad Sodagudi To: gregkh@linuxfoundation.org, segher@kernel.crashing.org, ghackmann@google.com, yamada.masahiro@socionext.com Cc: linux-kbuild@vger.kernel.org, linux-kernel@vger.kernel.org, Prasad Sodagudi Subject: [PATCH] kbuild: clang: Disable -Wunused-const-variable warnings Date: Mon, 29 Jan 2018 09:08:00 -0800 Message-Id: <1517245680-3361-1-git-send-email-psodagud@codeaurora.org> X-Mailer: git-send-email 1.9.1 In-Reply-To: References: Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Currently -Wunused-variable warnings are disabled with clang and with gcc -Wunused-variable warnings are enabled, with this setting all unused local variables would be warned in clang as well. Disable -Wunused-const-variable warnings instead of disabling -Wunused-variable warnings, So that in both clang and GCC -Wunused-const-variable gets disabled. Signed-off-by: Prasad Sodagudi --- Makefile | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/Makefile b/Makefile index 339397b..4b6c8e2 100644 --- a/Makefile +++ b/Makefile @@ -698,7 +698,6 @@ KBUILD_CFLAGS += $(stackp-flag) ifeq ($(cc-name),clang) KBUILD_CPPFLAGS += $(call cc-option,-Qunused-arguments,) -KBUILD_CFLAGS += $(call cc-disable-warning, unused-variable) KBUILD_CFLAGS += $(call cc-disable-warning, format-invalid-specifier) KBUILD_CFLAGS += $(call cc-disable-warning, gnu) KBUILD_CFLAGS += $(call cc-disable-warning, address-of-packed-member) @@ -716,9 +715,9 @@ else # These warnings generated too much noise in a regular build. # Use make W=1 to enable them (see scripts/Makefile.extrawarn) KBUILD_CFLAGS += $(call cc-disable-warning, unused-but-set-variable) -KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) endif +KBUILD_CFLAGS += $(call cc-disable-warning, unused-const-variable) ifdef CONFIG_FRAME_POINTER KBUILD_CFLAGS += -fno-omit-frame-pointer -fno-optimize-sibling-calls else -- The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,\na Linux Foundation Collaborative Project