diff mbox

[v4,3/4] build: enable unused value checks for clang

Message ID 20170214123057.92544-4-roger.pau@citrix.com (mailing list archive)
State New, archived
Headers show

Commit Message

Roger Pau Monné Feb. 14, 2017, 12:30 p.m. UTC
Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
---
Cc: Andrew Cooper <andrew.cooper3@citrix.com>
Cc: George Dunlap <George.Dunlap@eu.citrix.com>
Cc: Ian Jackson <ian.jackson@eu.citrix.com>
Cc: Jan Beulich <jbeulich@suse.com>
Cc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
Cc: Stefano Stabellini <sstabellini@kernel.org>
Cc: Tim Deegan <tim@xen.org>
Cc: Wei Liu <wei.liu2@citrix.com>
---
 Config.mk | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

Comments

Jan Beulich Feb. 14, 2017, 2 p.m. UTC | #1
>>> On 14.02.17 at 13:30, <roger.pau@citrix.com> wrote:
> --- a/Config.mk
> +++ b/Config.mk
> @@ -213,8 +213,7 @@ CFLAGS += -std=gnu99
>  CFLAGS += -Wall -Wstrict-prototypes
>  
>  # Clang complains about macros that expand to 'if ( ( foo == bar ) ) ...'
> -# and is a bit too fierce about unused return values
> -CFLAGS-$(clang) += -Wno-parentheses -Wno-unused-value
> +CFLAGS-$(clang) += -Wno-parentheses

Same question here - does removing the warning suppression work
with all clang versions, or just new enough ones?

Jan
Roger Pau Monné Feb. 14, 2017, 2:09 p.m. UTC | #2
On Tue, Feb 14, 2017 at 07:00:18AM -0700, Jan Beulich wrote:
> >>> On 14.02.17 at 13:30, <roger.pau@citrix.com> wrote:
> > --- a/Config.mk
> > +++ b/Config.mk
> > @@ -213,8 +213,7 @@ CFLAGS += -std=gnu99
> >  CFLAGS += -Wall -Wstrict-prototypes
> >  
> >  # Clang complains about macros that expand to 'if ( ( foo == bar ) ) ...'
> > -# and is a bit too fierce about unused return values
> > -CFLAGS-$(clang) += -Wno-parentheses -Wno-unused-value
> > +CFLAGS-$(clang) += -Wno-parentheses
> 
> Same question here - does removing the warning suppression work
> with all clang versions, or just new enough ones?

Works with 3.5 and 3.8 at least. As I said in the other reply, given the
previous state of Xen with clang I barely doubt anyone was actually compiling
Xen with clang until I setup the FreeBSD ports and Doug the Travis stuff.

Roger.
diff mbox

Patch

diff --git a/Config.mk b/Config.mk
index 7d08d16..bff4dc5 100644
--- a/Config.mk
+++ b/Config.mk
@@ -213,8 +213,7 @@  CFLAGS += -std=gnu99
 CFLAGS += -Wall -Wstrict-prototypes
 
 # Clang complains about macros that expand to 'if ( ( foo == bar ) ) ...'
-# and is a bit too fierce about unused return values
-CFLAGS-$(clang) += -Wno-parentheses -Wno-unused-value
+CFLAGS-$(clang) += -Wno-parentheses
 
 $(call cc-option-add,HOSTCFLAGS,HOSTCC,-Wdeclaration-after-statement)
 $(call cc-option-add,CFLAGS,CC,-Wdeclaration-after-statement)