2020-11-13 10:30:52 +00:00
|
|
|
From c57a8b43401ca9a1b889fa9fd421ac49c3dbd380 Mon Sep 17 00:00:00 2001
|
2020-08-21 10:18:02 +00:00
|
|
|
From: Ariadne Conill <ariadne@dereferenced.org>
|
|
|
|
Date: Fri, 21 Aug 2020 06:47:43 +0000
|
2020-11-13 10:30:52 +00:00
|
|
|
Subject: [PATCH 06/39] Enable -Wformat and -Wformat-security by default.
|
2018-12-12 17:14:55 +00:00
|
|
|
|
2020-08-21 10:18:02 +00:00
|
|
|
---
|
|
|
|
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.
|
2018-12-12 17:14:55 +00:00
|
|
|
|
|
|
|
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
|
2020-08-21 10:18:02 +00:00
|
|
|
@@ -620,7 +620,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
|
2018-12-12 17:14:55 +00:00
|
|
|
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.
|
|
|
|
|
2020-08-21 10:18:02 +00:00
|
|
|
Wformat-overflow=
|
|
|
|
--
|
2020-11-13 10:30:52 +00:00
|
|
|
2.28.0
|
2020-08-21 10:18:02 +00:00
|
|
|
|