Skip to contentSkip to conversation

dtc: Add -Wredundant-decls

PATCH David Gibson 1 participant 1 message Mar 11, 2010 Kbuild

lore
Share & tools
lore
#0 lore raw

We are almost clean already with the -Wredundant-decls warning. The only exception is a declaration for isatty() inside the flex-generated code. This can be removed by using flex's "never-interactive" option, which we probably should be using anyway, since we never parse interactively in the sense that this option implies.

Makefile +1 -1
Index: dtc/Makefile
===================================================================
@@ -17,7 +17,7 @@ CONFIG_LOCALVERSION =
 
 CPPFLAGS = -I libfdt
 WARNINGS = -Werror -Wall -Wpointer-arith -Wcast-qual -Wnested-externs \
-	-Wstrict-prototypes -Wmissing-prototypes
+	-Wstrict-prototypes -Wmissing-prototypes -Wredundant-decls
 CFLAGS = -g -Os -fPIC -Werror $(WARNINGS)
 
 BISON = bison
convert-dtsv0-lexer.l +1 -1
Index: dtc/convert-dtsv0-lexer.l
===================================================================
@@ -17,7 +17,7 @@
  *                                                                   USA
  */
 
-%option noyywrap nounput noinput
+%option noyywrap nounput noinput never-interactive
 
 %x INCLUDE
 %x BYTESTRING
dtc-lexer.l +1 -1
Index: dtc/dtc-lexer.l
===================================================================
@@ -18,7 +18,7 @@
  *                                                                   USA
  */
 
-%option noyywrap nounput noinput
+%option noyywrap nounput noinput never-interactive
 
 %x INCLUDE
 %x BYTESTRING
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson