From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Marek Subject: Re: [PATCH] Makefiles: Disable unused-variable warning Date: Sun, 08 Jan 2012 16:01:17 +0100 Message-ID: <4F09AFBD.60503@suse.cz> References: <1324695619-5537-1-git-send-email-kirill@shutemov.name> <20111227135752.GK5344@tiehlicka.suse.cz> Mime-Version: 1.0 Content-Transfer-Encoding: 7bit Return-path: In-Reply-To: <20111227135752.GK5344-VqjxzfR4DlwKmadIfiO5sKVXKuFTiq87@public.gmane.org> Sender: cgroups-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org List-ID: Content-Type: text/plain; charset="us-ascii" To: Michal Hocko Cc: "Kirill A. Shutemov" , linux-mm-Bw31MaZKKs3YtjvyW6yDsg@public.gmane.org, cgroups-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, linux-kernel-u79uwXL29TY76Z2rM5mHXA@public.gmane.org, containers-cunTk1MwBs9QetFLy7KEm3xJsTq8ys+cHZ5vskTnxNA@public.gmane.org, KAMEZAWA Hiroyuki , Balbir Singh , Johannes Weiner , linux-kbuild-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Dne 27.12.2011 14:57, Michal Hocko napsal(a): > Anyway, I am wondering why unused-but-set-variable is disabled while > unused-variable is enabled. unused-but-set-variable was disabled, because it was a new warning in gcc 4.6 and produced too much noise relatively to its severity. A make W=1 build of x86_64_defconfig gives: $ grep -c 'Wunused-but-set-variable' log 77 $ grep -c 'Wunused-variable' log 0 More exotic configuration will probably result in a couple of unused variable warnings, but that IMO no reason to disable them globally. > Shouldn't we just disable it as well rather > than workaround this in the code? The warning is just pure noise in this > case. If it's noise in a particular case, there is always the option to add CFLAGS_memcontrol.o := $(call cc-disable-warning, unused-variable) to the respective Makefile. Michal From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from cantor2.suse.de ([195.135.220.15]:51666 "EHLO mx2.suse.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752650Ab2AHO7U (ORCPT ); Sun, 8 Jan 2012 09:59:20 -0500 Message-ID: <4F09AFBD.60503@suse.cz> Date: Sun, 08 Jan 2012 16:01:17 +0100 From: Michal Marek MIME-Version: 1.0 Subject: Re: [PATCH] Makefiles: Disable unused-variable warning References: <1324695619-5537-1-git-send-email-kirill@shutemov.name> <20111227135752.GK5344@tiehlicka.suse.cz> In-Reply-To: <20111227135752.GK5344@tiehlicka.suse.cz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: linux-kbuild-owner@vger.kernel.org List-ID: To: Michal Hocko Cc: "Kirill A. Shutemov" , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, containers@lists.linux-foundation.org, KAMEZAWA Hiroyuki , Balbir Singh , Johannes Weiner , linux-kbuild@vger.kernel.org Dne 27.12.2011 14:57, Michal Hocko napsal(a): > Anyway, I am wondering why unused-but-set-variable is disabled while > unused-variable is enabled. unused-but-set-variable was disabled, because it was a new warning in gcc 4.6 and produced too much noise relatively to its severity. A make W=1 build of x86_64_defconfig gives: $ grep -c 'Wunused-but-set-variable' log 77 $ grep -c 'Wunused-variable' log 0 More exotic configuration will probably result in a couple of unused variable warnings, but that IMO no reason to disable them globally. > Shouldn't we just disable it as well rather > than workaround this in the code? The warning is just pure noise in this > case. If it's noise in a particular case, there is always the option to add CFLAGS_memcontrol.o := $(call cc-disable-warning, unused-variable) to the respective Makefile. Michal From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from psmtp.com (na3sys010amx160.postini.com [74.125.245.160]) by kanga.kvack.org (Postfix) with SMTP id 4D9D06B005A for ; Sun, 8 Jan 2012 09:59:21 -0500 (EST) Message-ID: <4F09AFBD.60503@suse.cz> Date: Sun, 08 Jan 2012 16:01:17 +0100 From: Michal Marek MIME-Version: 1.0 Subject: Re: [PATCH] Makefiles: Disable unused-variable warning References: <1324695619-5537-1-git-send-email-kirill@shutemov.name> <20111227135752.GK5344@tiehlicka.suse.cz> In-Reply-To: <20111227135752.GK5344@tiehlicka.suse.cz> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Michal Hocko Cc: "Kirill A. Shutemov" , linux-mm@kvack.org, cgroups@vger.kernel.org, linux-kernel@vger.kernel.org, containers@lists.linux-foundation.org, KAMEZAWA Hiroyuki , Balbir Singh , Johannes Weiner , linux-kbuild@vger.kernel.org Dne 27.12.2011 14:57, Michal Hocko napsal(a): > Anyway, I am wondering why unused-but-set-variable is disabled while > unused-variable is enabled. unused-but-set-variable was disabled, because it was a new warning in gcc 4.6 and produced too much noise relatively to its severity. A make W=1 build of x86_64_defconfig gives: $ grep -c 'Wunused-but-set-variable' log 77 $ grep -c 'Wunused-variable' log 0 More exotic configuration will probably result in a couple of unused variable warnings, but that IMO no reason to disable them globally. > Shouldn't we just disable it as well rather > than workaround this in the code? The warning is just pure noise in this > case. If it's noise in a particular case, there is always the option to add CFLAGS_memcontrol.o := $(call cc-disable-warning, unused-variable) to the respective Makefile. Michal -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Fight unfair telecom internet charges in Canada: sign http://stopthemeter.ca/ Don't email: email@kvack.org