From 2017d08745979126c7c46a1760d65672b0dca51b Mon Sep 17 00:00:00 2001 From: Mamoru TASAKA Date: Fri, 5 Feb 2016 02:21:31 +0900 Subject: [PATCH] Fix for gcc6 -Werror=format-security --- ...ile-with-gcc6-Werror-format-security.patch | 34 +++++++++++++++++++ gnome-commander.spec | 10 ++++-- 2 files changed, 42 insertions(+), 2 deletions(-) create mode 100644 gcmd-1-4-0001-Make-code-compile-with-gcc6-Werror-format-security.patch diff --git a/gcmd-1-4-0001-Make-code-compile-with-gcc6-Werror-format-security.patch b/gcmd-1-4-0001-Make-code-compile-with-gcc6-Werror-format-security.patch new file mode 100644 index 0000000..6f8fd37 --- /dev/null +++ b/gcmd-1-4-0001-Make-code-compile-with-gcc6-Werror-format-security.patch @@ -0,0 +1,34 @@ +From 6bf9864e1117cce8fbc3c8d7874950cdaba5e3f2 Mon Sep 17 00:00:00 2001 +From: Mamoru TASAKA +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 + diff --git a/gnome-commander.spec b/gnome-commander.spec index b7e627b..79a87f6 100644 --- a/gnome-commander.spec +++ b/gnome-commander.spec @@ -28,7 +28,7 @@ %global use_autotool 0 %global update_po 0 %global if_pre 0 -%global main_release 1 +%global main_release 2 #%%global extratag %{git_pull_JST}git%{shorthash} %undefine extratag %global mimeedit_rev 1958 @@ -53,7 +53,7 @@ Name: gnome-commander Version: 1.4.7 # Downgrade 3 times, sorry... Epoch: 4 -Release: %{fedora_rel}%{?dist}.1 +Release: %{fedora_rel}%{?dist} 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(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 Source10: mimeedit-svn%{mimeedit_rev}.sh 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) BuildRequires: desktop-file-utils @@ -137,6 +139,7 @@ ansluta till FTP-servrar och SMB-nätverk. #%%setup -q -n %{name}-%{githash} %patch1 -p1 -b .path +%patch10 -p1 -b .format %if 0%{use_autotool} > 0 ( export NOCONFIGURE=1 ; sh autogen.sh ) @@ -279,6 +282,9 @@ exit 0 %{_datadir}/pixmaps/%{name}/ %changelog +* Fri Feb 5 2016 Mamoru TASAKA - 4:1.4.7-2 +- Fix for gcc6 -Werror=format-security + * Wed Jun 24 2015 Rex Dieter - 4:1.4.7-1.1 - rebuild (exiv2)