[Olsr-dev] [PATCH v1 10/12] Makefile: WARNINGS: add -Wjump-misses-init

Ferry Huberts (spam-protected)
Tue May 29 15:59:39 CEST 2012

From: Ferry Huberts <(spam-protected)>

-Wjump-misses-init (C, Objective-C only)
  Warn if a "goto" statement or a "switch" statement jumps forward
  across the initialization of a variable, or jumps backward to a
  label after the variable has been initialized.  This only warns
  about variables which are initialized when they are declared.
  This warning is only supported for C and Objective C; in C++ this
  sort of branch is an error in any case.

  -Wjump-misses-init is included in -Wc++-compat. It can be disabled
  with the -Wno-jump-misses-init option.

Signed-off-by: Ferry Huberts <(spam-protected)>
 Makefile.inc |    1 +
 1 files changed, 1 insertions(+), 0 deletions(-)

diff --git a/Makefile.inc b/Makefile.inc
index b817e6d..930489a 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -97,6 +97,7 @@ WARNINGS +=	-Wswitch-default
 WARNINGS +=	-Wsync-nand
 WARNINGS +=	-Wundef
 WARNINGS +=	-Wlogical-op
+WARNINGS +=	-Wjump-misses-init
 # the following 2 do not work yet and need more work on it
 #WARNINGS +=	-Wconversion
 #WARNINGS +=	-Wredundant-decls

More information about the Olsr-dev mailing list