galeb

Једноставна статичка дистрибуција заснована на musl-у
git clone https://git.sr.ht/~strahinja/galeb
Дневник | Датотеке | Референце | ПРОЧИТАЈМЕ | ЛИЦЕНЦА

0006-Enable-Wformat-and-Wformat-security-by-default.patch (1458B)


      1 From c664283dd30949c5299d1c45bd5740bcfe993d22 Mon Sep 17 00:00:00 2001
      2 From: Ariadne Conill <ariadne@dereferenced.org>
      3 Date: Fri, 21 Aug 2020 06:47:43 +0000
      4 Subject: [PATCH] Enable -Wformat and -Wformat-security by default.
      5 
      6 ---
      7  gcc/c-family/c.opt | 4 ++--
      8  1 file changed, 2 insertions(+), 2 deletions(-)
      9 
     10 diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
     11 index 07da40ef43b..8683f706426 100644
     12 --- a/gcc/c-family/c.opt
     13 +++ b/gcc/c-family/c.opt
     14 @@ -692,7 +692,7 @@ Warn about function calls with format strings that write past the end
     15  of the destination region.  Same as -Wformat-overflow=1.
     16  
     17  Wformat-security
     18 -C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
     19 +C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
     20  Warn about possible security problems with format functions.
     21  
     22  Wformat-signedness
     23 @@ -713,7 +713,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
     24  Warn about zero-length formats.
     25  
     26  Wformat=
     27 -C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
     28 +C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
     29  Warn about printf/scanf/strftime/strfmon format string anomalies.
     30  
     31  Wformat-overflow=