Skip to contentSkip to conversation

Makefile: set -Wmissing-prototypes on all architechtures (was only on mips)

PATCH Applied Sergey Koshechkin 3 participants 3 messages Nov 17, 2015 – Nov 18, 2015

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 3/3 Makefile: set -Wmissing-prototypes on all architechtures (was only on mips)

---
 Makefile           | 2 +-
 arch/mips/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Makefile +1 -1
index 1029dc1..9a54a44 100644
@@ -183,7 +183,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
 
 HOSTCC       = gcc
 HOSTCXX      = g++
-HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+HOSTCFLAGS   = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
 HOSTCXXFLAGS = -O2
 
 # Decide whether to build built-in, modular, or both.
arch/mips/Makefile +1 -1
index 75761b5..b003945 100644
@@ -12,7 +12,7 @@ endif
 CPPFLAGS += -D__MIPS__ -fno-strict-aliasing -fno-merge-constants
 
 cflags-y += -G 0 -mno-abicalls -fno-pic -pipe
-cflags-y += -Wall -Wmissing-prototypes -Wstrict-prototypes \
+cflags-y += -Wall -Wstrict-prototypes \
 	-Wno-uninitialized -Wno-format -Wno-main
 
 ifdef CONFIG_32BIT
Signature · 7 lines
2.6.2


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#1 lore raw

Am Dienstag, den 17.11.2015, 15:15 +0300 schrieb Sergey Koshechkin:

Quoted 24 lines
---
 Makefile           | 2 +-
 arch/mips/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Makefile +1 -1
index 1029dc1..9a54a44 100644
@@ -183,7 +183,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
 
 HOSTCC       = gcc
 HOSTCXX      = g++
-HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+HOSTCFLAGS   = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
 HOSTCXXFLAGS = -O2
 
 # Decide whether to build built-in, modular, or both.
arch/mips/Makefile +0 -0
index 75761b5..b003945 100644

arch/mips/Makefile endif · line 15

Quoted 5 lines
arch/mips/Makefile +1 -1
@@ -12,7 +12,7 @@ endif
 CPPFLAGS += -D__MIPS__ -fno-strict-aliasing -fno-merge-constants
 
 cflags-y += -G 0 -mno-abicalls -fno-pic -pipe
-cflags-y += -Wall -Wmissing-prototypes -Wstrict-prototypes \
+cflags-y += -Wall -Wstrict-prototypes \

Wstrict-prototypes is already set for all architectures, as seen above. Can you remove it here?

Quoted 3 lines
arch/mips/Makefile +0 -0
 	-Wno-uninitialized -Wno-format -Wno-main
 
 ifdef CONFIG_32BIT
Signature · 8 lines
Pengutronix e.K.             | Lucas Stach                 |
Industrial Linux Solutions   | http://www.pengutronix.de/  |


_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox
#2 lore raw
In reply to Sergey Koshechkin
Quoted 24 lines · Sergey Koshechkin
---
 Makefile           | 2 +-
 arch/mips/Makefile | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)
Makefile +1 -1
index 1029dc1..9a54a44 100644
@@ -183,7 +183,7 @@ CONFIG_SHELL := $(shell if [ -x "$$BASH" ]; then echo $$BASH; \
 
 HOSTCC       = gcc
 HOSTCXX      = g++
-HOSTCFLAGS   = -Wall -Wstrict-prototypes -O2 -fomit-frame-pointer
+HOSTCFLAGS   = -Wall -Wmissing-prototypes -Wstrict-prototypes -O2 -fomit-frame-pointer
 HOSTCXXFLAGS = -O2
 
 # Decide whether to build built-in, modular, or both.
arch/mips/Makefile +0 -0
index 75761b5..b003945 100644

arch/mips/Makefile endif · line 15

Quoted 4 lines
arch/mips/Makefile +0 -1
@@ -12,7 +12,7 @@ endif
 CPPFLAGS += -D__MIPS__ -fno-strict-aliasing -fno-merge-constants
 
 cflags-y += -G 0 -mno-abicalls -fno-pic -pipe
-cflags-y += -Wall -Wmissing-prototypes -Wstrict-prototypes \

You are removing this from cflags, but adding to HOSTCFLAGS above, these variables are not equivalent. You should add to CFLAGS instead. Now I know why I haven't seen these warnings from the host tools before.

Sascha

Signature · 9 lines
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

_______________________________________________
barebox mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/barebox