Skip to contentSkip to conversation

xen/x86: Add -Wnested-externs to CFLAGS

PATCH In review Tim Deegan 3 participants 4 messages May 26, 2011

lore
Share & tools
lore

Tim Deegan

author
#0 lore raw

PATCH 1/1 xen/x86: Add -Wnested-externs to CFLAGS

# HG changeset patch
# User Tim Deegan <[email protected]> # Date 1306427536 -3600
# Node ID 73ba1d95d1ec59246e2f0a8e8a1136cd5f9d98c2 # Parent 69fe4b8a7c0961070a626cb473d19a0770db663a xen/x86: Add -Wnested-externs to CFLAGS

This will catch any new extern declarations that happen actually inside function bodies. Unfortunately there's no equivalent warning for extern declarations at rootl level in .c files.

xen/arch/x86/Rules.mk +1 -0
diff -r 69fe4b8a7c09 -r 73ba1d95d1ec xen/arch/x86/Rules.mk
@@ -27,6 +27,7 @@ CFLAGS += -I$(BASEDIR)/include/asm-x86/m
 CFLAGS += -msoft-float
 
 $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
+$(call cc-option-add,CFLAGS,CC,-Wnested-externs)
 
 ifeq ($(supervisor_mode_kernel),y)
 CFLAGS += -DCONFIG_X86_SUPERVISOR_MODE_KERNEL=1
#1 lore raw
Quoted 15 lines · Tim Deegan

# HG changeset patch
# User Tim Deegan <[email protected]> # Date 1306427536 -3600
# Node ID 73ba1d95d1ec59246e2f0a8e8a1136cd5f9d98c2 # Parent 69fe4b8a7c0961070a626cb473d19a0770db663a xen/x86: Add -Wnested-externs to CFLAGS

This will catch any new extern declarations that happen actually inside function bodies. Unfortunately there's no equivalent warning for extern declarations at rootl level in .c files.

diff -r 69fe4b8a7c09 -r 73ba1d95d1ec xen/arch/x86/Rules.mk

xen/arch/x86/Rules.mk CFLAGS += -I$(BASEDIR)/include/asm-x86/m · line 30

Quoted 4 lines
xen/arch/x86/Rules.mk +1 -0
@@ -27,6 +27,7 @@ CFLAGS += -I$(BASEDIR)/include/asm-x86/m
 CFLAGS += -msoft-float
 
 $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
+$(call cc-option-add,CFLAGS,CC,-Wnested-externs)

^ missing s?

Quoted 8 lines
xen/arch/x86/Rules.mk +0 -0
 ifeq ($(supervisor_mode_kernel),y)
 CFLAGS += -DCONFIG_X86_SUPERVISOR_MODE_KERNEL=1
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

author
#2 lore raw
Quoted 18 lines · Ian Campbell
Quoted 17 lines · Tim Deegan

# HG changeset patch
# User Tim Deegan <[email protected]> # Date 1306427536 -3600
# Node ID 73ba1d95d1ec59246e2f0a8e8a1136cd5f9d98c2 # Parent 69fe4b8a7c0961070a626cb473d19a0770db663a xen/x86: Add -Wnested-externs to CFLAGS

This will catch any new extern declarations that happen actually inside function bodies. Unfortunately there's no equivalent warning for extern declarations at rootl level in .c files.

diff -r 69fe4b8a7c09 -r 73ba1d95d1ec xen/arch/x86/Rules.mk

xen/arch/x86/Rules.mk +0 -0
@@ -27,6 +27,7 @@ CFLAGS += -I$(BASEDIR)/include/asm-x86/m
 CFLAGS += -msoft-float
 
Quoted 3 lines

xen/arch/x86/Rules.mk CFLAGS += -I$(BASEDIR)/include/asm-x86/m · line 30

Quoted 2 lines
xen/arch/x86/Rules.mk +1 -0
 $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
+$(call cc-option-add,CFLAGS,CC,-Wnested-externs)

^ missing s?

No; the _s_ version is a wrapper that processes a list.

Tim.

Quoted 10 lines
Quoted 8 lines
xen/arch/x86/Rules.mk +0 -0
 ifeq ($(supervisor_mode_kernel),y)
 CFLAGS += -DCONFIG_X86_SUPERVISOR_MODE_KERNEL=1
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel

Signature · 3 lines
Tim Deegan <[email protected]>
Principal Software Engineer, Xen Platform Team
Citrix Systems UK Ltd.  (Company #02937203, SL9 0BG)
#3 lore raw
Quoted 19 lines · Tim Deegan
Quoted 18 lines · Ian Campbell
Quoted 17 lines · Tim Deegan

# HG changeset patch
# User Tim Deegan <[email protected]> # Date 1306427536 -3600
# Node ID 73ba1d95d1ec59246e2f0a8e8a1136cd5f9d98c2 # Parent 69fe4b8a7c0961070a626cb473d19a0770db663a xen/x86: Add -Wnested-externs to CFLAGS

This will catch any new extern declarations that happen actually inside function bodies. Unfortunately there's no equivalent warning for extern declarations at rootl level in .c files.

diff -r 69fe4b8a7c09 -r 73ba1d95d1ec xen/arch/x86/Rules.mk

xen/arch/x86/Rules.mk +0 -0
@@ -27,6 +27,7 @@ CFLAGS += -I$(BASEDIR)/include/asm-x86/m
 CFLAGS += -msoft-float
 
Quoted 5 lines
Quoted 3 lines

xen/arch/x86/Rules.mk CFLAGS += -I$(BASEDIR)/include/asm-x86/m · line 30

Quoted 2 lines
xen/arch/x86/Rules.mk +1 -0
 $(call cc-options-add,CFLAGS,CC,$(EMBEDDED_EXTRA_CFLAGS))
+$(call cc-option-add,CFLAGS,CC,-Wnested-externs)

^ missing s?

No; the _s_ version is a wrapper that processes a list.

Ah, nevermind then.

Ian.

Quoted 15 lines

Tim.

Quoted 10 lines
Quoted 8 lines
xen/arch/x86/Rules.mk +0 -0
 ifeq ($(supervisor_mode_kernel),y)
 CFLAGS += -DCONFIG_X86_SUPERVISOR_MODE_KERNEL=1
 

_______________________________________________
Xen-devel mailing list
[email protected]
http://lists.xensource.com/xen-devel