summaryrefslogblamecommitdiff
path: root/system/gcc/011_all_default-warn-format-security.patch
blob: 1f400d02616a9135b446b1d079e98ce3a6f76702 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11




                                                 

                                                                                                    



                                                                                                                           
                                                             
 


                                                                                                   

         


                                                                                                                                                 

                    
Enable -Wformat and -Wformat-security by default.


--- a/gcc/c-family/c.opt
+++ b/gcc/c-family/c.opt
@@ -459,7 +459,7 @@ C ObjC C++ ObjC++ Var(warn_format_nonliteral) Warning LangEnabledBy(C ObjC C++ O
 Warn about format strings that are not literals.
 
 Wformat-security
-C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
+C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
 Warn about possible security problems with format functions.
 
 Wformat-signedness
@@ -475,7 +475,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
 Warn about zero-length formats.
 
 Wformat=
-C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
+C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
 Warn about printf/scanf/strftime/strfmon format string anomalies.
 
 Wignored-qualifiers