Re: [PATCH] perf: fix gcc4.6 build failure with unused-but-setwarning

From: Ingo Molnar
Date: Fri Jun 03 2011 - 03:41:13 EST



* Darren Hart <dvhart@xxxxxxxxxxxxxxx> wrote:

> This patch creates a new perf/Makefile variable, LESS_WARNINGS and
> adds -Wno-unused-but-set-variable. The new variable helps
> distinguish between the added warnings in EXTRA_WARNINGS versus
> those we want to remove, including the existing -Wno-system-headers
> which I moved to LESS_WARNINGS.

Btw., while you resolved the issue, it would nevertheless nice to
introduce a 'make WERROR=0' build method that removes -Werror.

Would you be interested in sending a patch for that?

There would be several advantages of such a patch:

- GCC often introduces new warnings with lots of false positives -
breaking -Werror builds. WERROR=0 would allow one to build perf
without much fuss - while people would still send patches to avoid
the fuss of having to type WERROR=0 :-)

- bisecting back to commits that produce a (mostly harmless) warning
on some compiler is more difficult. With WERROR=0 one could bisect
without worrying about harmless warnings.

Thanks,

Ingo
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/