Thread (6 messages) 6 messages, 4 authors, 2015-12-01

Re: [PATCH] cxl: Fix build failure due to -Wunused-variable behaviour change

flat view

From: Torsten Duwe <hidden>
Date: 2015-12-01 14:47:45

On Thu, Nov 26, 2015 at 10:41:53AM +1100, Michael Ellerman wrote:
On Wed, 2015-11-25 at 17:16 +0100, Torsten Duwe wrote:
quoted
On Tue, Sep 15, 2015 at 03:48:34PM +1000, Ian Munsie wrote:
quoted
--- a/drivers/misc/cxl/Makefile
+++ b/drivers/misc/cxl/Makefile
@@ -1,4 +1,4 @@
-ccflags-y := -Werror
+ccflags-y := -Werror -Wno-unused-const-variable
JFYI, my gcc-4.3 does not like this switch.
What's the minimum compiler version to build this code?
I build everything with gcc 4.4.4, so if it breaks with that I will notice.

Does it work if you wrap it in cc-option? eg:

ccflags-y := -Werror $(call cc-option,-Wno-unused-const-variable)
Yes, now it builds. It also looks cleaner to me: compilers which check
for "unused-const-variable"s should have this switch and the check is disabled.
All other (known :) warnings error out.

	Torsten
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help