From 1559cbe1ebcea1dac3f5c3a40a51efedd7766ffc Mon Sep 17 00:00:00 2001 From: Laurent Bercot Date: Sat, 7 Sep 2024 14:55:46 +0000 Subject: Initial commit Signed-off-by: Laurent Bercot --- ...e-Wformat-and-Wformat-security-by-default.patch | 34 ++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 musl/patches-in-mcm/gcc-13.2.0/0006-Enable-Wformat-and-Wformat-security-by-default.patch (limited to 'musl/patches-in-mcm/gcc-13.2.0/0006-Enable-Wformat-and-Wformat-security-by-default.patch') diff --git a/musl/patches-in-mcm/gcc-13.2.0/0006-Enable-Wformat-and-Wformat-security-by-default.patch b/musl/patches-in-mcm/gcc-13.2.0/0006-Enable-Wformat-and-Wformat-security-by-default.patch new file mode 100644 index 0000000..55dff36 --- /dev/null +++ b/musl/patches-in-mcm/gcc-13.2.0/0006-Enable-Wformat-and-Wformat-security-by-default.patch @@ -0,0 +1,34 @@ +From bb25e8489384504cd59e4a2538720863da1fb29c Mon Sep 17 00:00:00 2001 +From: Ariadne Conill +Date: Fri, 21 Aug 2020 06:47:43 +0000 +Subject: [PATCH 06/35] 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 a75038930ae..b98726f33ed 100644 +--- a/gcc/c-family/c.opt ++++ b/gcc/c-family/c.opt +@@ -704,7 +704,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 +@@ -725,7 +725,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.41.0 + -- cgit v1.3.1