Makefile: WARNINGS: add -Winit-self
authorFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 29 May 2012 08:48:27 +0000 (10:48 +0200)
committerFerry Huberts <ferry.huberts@pelagic.nl>
Tue, 29 May 2012 13:19:31 +0000 (15:19 +0200)
-Winit-self (C, C++, Objective-C and Objective-C++ only)
   Warn about uninitialized variables which are initialized
   with themselves.  Note this option can only be used with
   the -Wuninitialized option.

   For example, GCC will warn about "i" being uninitialized
   in the following snippet only when -Winit-self has been
   specified:

           int f()
           {
             int i = i;
             return i;
           }

Signed-off-by: Ferry Huberts <ferry.huberts@pelagic.nl>
Makefile.inc

index dc54539..541e9fb 100644 (file)
@@ -92,6 +92,7 @@ WARNINGS +=   -Wcast-align
 WARNINGS +=    -Wdouble-promotion
 WARNINGS +=    -Wformat-security
 WARNINGS +=    -Wformat-y2k
+WARNINGS +=    -Winit-self
 # the following 2 do not work yet and need more work on it
 #WARNINGS +=   -Wconversion
 #WARNINGS +=   -Wredundant-decls