[packages/crossmingw32-gcc] - fix format string warnings

baggins baggins at pld-linux.org
Fri Dec 7 22:40:26 CET 2012


commit 7b172b9256fd093bb2b955659a26a6d4a80d3d89
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Fri Dec 7 22:40:16 2012 +0100

    - fix format string warnings

 crossmingw32-gcc.spec |  2 ++
 format-security.patch | 14 ++++++++++++++
 2 files changed, 16 insertions(+)
---
diff --git a/crossmingw32-gcc.spec b/crossmingw32-gcc.spec
index e26153e..05ebfc1 100644
--- a/crossmingw32-gcc.spec
+++ b/crossmingw32-gcc.spec
@@ -30,6 +30,7 @@ Patch100:	gcc-branch.diff
 Patch0:		%{name}-buildsystem1.patch
 Patch1:		%{name}-buildsystem2.patch
 Patch2:		%{name}-lfs.patch
+Patch3:		format-security.patch
 BuildRequires:	autoconf
 BuildRequires:	automake
 BuildRequires:	bison
@@ -318,6 +319,7 @@ Ten pakiet zawiera kompilator Javy generujący kod pod Win32.
 %patch100 -p0
 %patch0 -p1
 %patch2 -p1
+%patch3 -p1
 
 %if %{with bootstrap}
 # note: "winsup" dirs below are special, handled by gcc's configure
diff --git a/format-security.patch b/format-security.patch
new file mode 100644
index 0000000..b549233
--- /dev/null
+++ b/format-security.patch
@@ -0,0 +1,14 @@
+--- gcc-4.6.2/libcpp/expr.c~	2011-04-29 00:39:59.000000000 +0200
++++ gcc-4.6.2/libcpp/expr.c	2012-12-07 22:38:30.102991906 +0100
+@@ -434,9 +434,9 @@
+ 		                : N_("use of C99 long long integer constant");
+ 
+ 	  if (CPP_OPTION (pfile, c99))
+-            cpp_warning (pfile, CPP_W_LONG_LONG, message);
++            cpp_warning (pfile, CPP_W_LONG_LONG, "%s", message);
+           else
+-            cpp_pedwarning (pfile, CPP_W_LONG_LONG, message);
++            cpp_pedwarning (pfile, CPP_W_LONG_LONG, "%s", message);
+         }
+ 
+       result |= CPP_N_INTEGER;
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/crossmingw32-gcc.git/commitdiff/7b172b9256fd093bb2b955659a26a6d4a80d3d89



More information about the pld-cvs-commit mailing list