aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'upstream/Wformat.patch')
-rw-r--r--upstream/Wformat.patch45
1 files changed, 45 insertions, 0 deletions
diff --git a/upstream/Wformat.patch b/upstream/Wformat.patch
new file mode 100644
index 0000000..be0b07a
--- /dev/null
+++ b/upstream/Wformat.patch
@@ -0,0 +1,45 @@
+--- a/gcc/c-family/c-common.c 2012-02-13 21:12:54.000000000 +0100
++++ b/gcc/c-family/c-common.c 2012-07-09 23:17:18.375234684 +0200
+@@ -202,7 +202,19 @@ int warn_unknown_pragmas; /* Tri state v
+ /* Warn about format/argument anomalies in calls to formatted I/O functions
+ (*printf, *scanf, strftime, strfmon, etc.). */
+
++#ifdef ENABLE_ESPF
++int warn_format = 1;
++#else
+ int warn_format;
++#endif
++
++/* Warn about possible security problems with format functions. */
++
++#ifdef ENABLE_ESPF
++int warn_format_security = 1;
++#else
++int warn_format_security;
++#endif
+
+ /* C/ObjC language option variables. */
+
+--- a/gcc/c-family/c-common.h 2011-12-20 21:44:13.000000000 +0100
++++ b/gcc/c-family/c-common.h 2012-07-09 23:16:33.355233344 +0200
+@@ -594,6 +594,9 @@ extern int warn_unknown_pragmas; /* Tri
+
+ extern int warn_format;
+
++/* Warn about possible security problems with format functions. */
++
++extern int warn_format_security;
+
+ /* C/ObjC language option variables. */
+
+--- a/gcc/c-family/c.opt 2012-02-06 11:31:18.000000000 +0100
++++ b/gcc/c-family/c.opt 2012-07-09 22:07:11.449109322 +0200
+@@ -392,7 +392,7 @@ C ObjC C++ ObjC++ Var(warn_format_contai
+ Warn about format strings that contain NUL bytes
+
+ Wformat-security
+-C ObjC C++ ObjC++ Var(warn_format_security) Warning
++C ObjC C++ ObjC++ Warning
+ Warn about possible security problems with format functions
+
+ Wformat-y2k