summaryrefslogtreecommitdiff
path: root/repo/gcc/0006-Enable-Wformat-and-Wformat-security-by-default.patch
diff options
context:
space:
mode:
authordavidovski <david@davidovski.xyz>2022-05-31 11:05:19 +0100
committerdavidovski <david@davidovski.xyz>2022-05-31 11:05:19 +0100
commit48ca75555522716f0f686dcae3dd6cf3d8ad714d (patch)
tree00c0f58550ba4661e87376f2f02c8001c69bae44 /repo/gcc/0006-Enable-Wformat-and-Wformat-security-by-default.patch
parent871b2b573f01c1b3176a0f65458b3d281b41c437 (diff)
removed idea of repos
Diffstat (limited to 'repo/gcc/0006-Enable-Wformat-and-Wformat-security-by-default.patch')
-rw-r--r--repo/gcc/0006-Enable-Wformat-and-Wformat-security-by-default.patch34
1 files changed, 34 insertions, 0 deletions
diff --git a/repo/gcc/0006-Enable-Wformat-and-Wformat-security-by-default.patch b/repo/gcc/0006-Enable-Wformat-and-Wformat-security-by-default.patch
new file mode 100644
index 0000000..aca0075
--- /dev/null
+++ b/repo/gcc/0006-Enable-Wformat-and-Wformat-security-by-default.patch
@@ -0,0 +1,34 @@
+From 44b1a01cbe3932122112f38e06a21b1c9efad568 Mon Sep 17 00:00:00 2001
+From: Ariadne Conill <ariadne@dereferenced.org>
+Date: Fri, 21 Aug 2020 06:47:43 +0000
+Subject: [PATCH] Enable -Wformat and -Wformat-security by default.
+
+---
+ gcc/c-family/c.opt | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
+index c49da99d395..93f25319005 100644
+--- a/gcc/c-family/c.opt
++++ b/gcc/c-family/c.opt
+@@ -599,7 +599,7 @@ Warn about function calls with format strings that write past the end
+ of the destination region. Same as -Wformat-overflow=1.
+
+ 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
+@@ -620,7 +620,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.
+
+ Wformat-overflow=
+--
+2.31.1
+