Fix for gcc6 -Werror=format-security

i9cf
Mamoru TASAKA 9 years ago
parent 2f118716f3
commit 2017d08745

@ -0,0 +1,34 @@
From 6bf9864e1117cce8fbc3c8d7874950cdaba5e3f2 Mon Sep 17 00:00:00 2001
From: Mamoru TASAKA <mtasaka@fedoraproject.org>
Date: Fri, 5 Feb 2016 02:06:43 +0900
Subject: [PATCH] Make code compile with gcc6 -Werror=format-security
---
src/gnome-cmd-xml-config.cc | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/gnome-cmd-xml-config.cc b/src/gnome-cmd-xml-config.cc
index 6a38c57..ef2ebb5 100644
--- a/src/gnome-cmd-xml-config.cc
+++ b/src/gnome-cmd-xml-config.cc
@@ -849,7 +849,7 @@ gboolean gnome_cmd_xml_config_parse (const gchar *xml, gsize xml_len, GnomeCmdDa
if (!g_markup_parse_context_parse (context, xml, xml_len, &error) ||
!g_markup_parse_context_end_parse (context, &error))
{
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
}
@@ -870,7 +870,7 @@ gboolean gnome_cmd_xml_config_load (const gchar *path, GnomeCmdData &cfg)
if (!g_file_get_contents (path, &xml, &xml_len, &error))
{
- g_warning (error->message);
+ g_warning ("%s", error->message);
g_error_free (error);
return FALSE;
--
2.7.0

@ -28,7 +28,7 @@
%global use_autotool 0 %global use_autotool 0
%global update_po 0 %global update_po 0
%global if_pre 0 %global if_pre 0
%global main_release 1 %global main_release 2
#%%global extratag %{git_pull_JST}git%{shorthash} #%%global extratag %{git_pull_JST}git%{shorthash}
%undefine extratag %undefine extratag
%global mimeedit_rev 1958 %global mimeedit_rev 1958
@ -53,7 +53,7 @@ Name: gnome-commander
Version: 1.4.7 Version: 1.4.7
# Downgrade 3 times, sorry... # Downgrade 3 times, sorry...
Epoch: 4 Epoch: 4
Release: %{fedora_rel}%{?dist}.1 Release: %{fedora_rel}%{?dist}
Summary: A nice and fast file manager for the GNOME desktop Summary: A nice and fast file manager for the GNOME desktop
Summary(pl): Menadżer plików dla GNOME oparty o Norton Commander'a (TM) Summary(pl): Menadżer plików dla GNOME oparty o Norton Commander'a (TM)
Summary(sv): GNOME Commander är en snabb och smidig filhanderare för GNOME Summary(sv): GNOME Commander är en snabb och smidig filhanderare för GNOME
@ -66,6 +66,8 @@ Source0: ftp://ftp.gnome.org/pub/GNOME/sources/%{name}/1.4/%{name}-%{versi
Source1: gnome-commander.sh Source1: gnome-commander.sh
Source10: mimeedit-svn%{mimeedit_rev}.sh Source10: mimeedit-svn%{mimeedit_rev}.sh
Patch1: gnome-commander-1.4.7-path-fedora-specific.patch Patch1: gnome-commander-1.4.7-path-fedora-specific.patch
# Fix for gcc6 -Werror=format-security
Patch10: gcmd-1-4-0001-Make-code-compile-with-gcc6-Werror-format-security.patch
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: desktop-file-utils BuildRequires: desktop-file-utils
@ -137,6 +139,7 @@ ansluta till FTP-servrar och SMB-nätverk.
#%%setup -q -n %{name}-%{githash} #%%setup -q -n %{name}-%{githash}
%patch1 -p1 -b .path %patch1 -p1 -b .path
%patch10 -p1 -b .format
%if 0%{use_autotool} > 0 %if 0%{use_autotool} > 0
( export NOCONFIGURE=1 ; sh autogen.sh ) ( export NOCONFIGURE=1 ; sh autogen.sh )
@ -279,6 +282,9 @@ exit 0
%{_datadir}/pixmaps/%{name}/ %{_datadir}/pixmaps/%{name}/
%changelog %changelog
* Fri Feb 5 2016 Mamoru TASAKA <mtasaka@fedoraproject.org> - 4:1.4.7-2
- Fix for gcc6 -Werror=format-security
* Wed Jun 24 2015 Rex Dieter <rdieter@fedoraproject.org> - 4:1.4.7-1.1 * Wed Jun 24 2015 Rex Dieter <rdieter@fedoraproject.org> - 4:1.4.7-1.1
- rebuild (exiv2) - rebuild (exiv2)

Loading…
Cancel
Save