OpenSDE Packages Database (without history before r20070)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
2.2 KiB

  1. # --- SDE-COPYRIGHT-NOTE-BEGIN ---
  2. # This copyright note is auto-generated by ./scripts/Create-CopyPatch.
  3. #
  4. # Filename: package/.../musl/pkg/gcc/0006-Enable-Wformat-and-Wformat-security-by-default.patch
  5. # Copyright (C) 2020 The OpenSDE Project
  6. #
  7. # More information can be found in the files COPYING and README.
  8. #
  9. # This patch file is dual-licensed. It is available under the license the
  10. # patched project is licensed under, as long as it is an OpenSource license
  11. # as defined at http://www.opensource.org/ (e.g. BSD, X11) or under the terms
  12. # of the GNU General Public License as published by the Free Software
  13. # Foundation; either version 2 of the License, or (at your option) any later
  14. # version.
  15. # --- SDE-COPYRIGHT-NOTE-END ---
  16. From 5e20872b8cc916cb457c63c6cd970c4fcba47bbb Mon Sep 17 00:00:00 2001
  17. From: Ariadne Conill <ariadne@dereferenced.org>
  18. Date: Fri, 21 Aug 2020 06:47:43 +0000
  19. Subject: [PATCH 06/30] Enable -Wformat and -Wformat-security by default.
  20. ---
  21. gcc/c-family/c.opt | 4 ++--
  22. 1 file changed, 2 insertions(+), 2 deletions(-)
  23. diff --git a/gcc/c-family/c.opt b/gcc/c-family/c.opt
  24. index c49da99d395..93f25319005 100644
  25. --- a/gcc/c-family/c.opt
  26. +++ b/gcc/c-family/c.opt
  27. @@ -599,7 +599,7 @@ Warn about function calls with format strings that write past the end
  28. of the destination region. Same as -Wformat-overflow=1.
  29. Wformat-security
  30. -C ObjC C++ ObjC++ Var(warn_format_security) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
  31. +C ObjC C++ ObjC++ Var(warn_format_security) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wformat=, warn_format >= 2, 0)
  32. Warn about possible security problems with format functions.
  33. Wformat-signedness
  34. @@ -620,7 +620,7 @@ C ObjC C++ ObjC++ Var(warn_format_zero_length) Warning LangEnabledBy(C ObjC C++
  35. Warn about zero-length formats.
  36. Wformat=
  37. -C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
  38. +C ObjC C++ ObjC++ Joined RejectNegative UInteger Var(warn_format) Init(1) Warning LangEnabledBy(C ObjC C++ ObjC++,Wall, 1, 0) IntegerRange(0, 2)
  39. Warn about printf/scanf/strftime/strfmon format string anomalies.
  40. Wformat-overflow=
  41. --
  42. 2.27.0