diff --git a/spacefm-0.9.3-Fix-compilation-with-Werror-format-security.patch b/spacefm-0.9.3-Fix-compilation-with-Werror-format-security.patch new file mode 100644 index 0000000..518bc4f --- /dev/null +++ b/spacefm-0.9.3-Fix-compilation-with-Werror-format-security.patch @@ -0,0 +1,34 @@ +From 3ad3ced1c7ca8725d9f53ba74d10f5bb408d704b Mon Sep 17 00:00:00 2001 +From: Mamoru TASAKA +Date: Tue, 28 Jan 2014 00:13:14 +0900 +Subject: [PATCH] Fix compilation with -Werror=format-security + +As g_set_error has a prototype G_GNUC_PRINTF (4, 5), +g_strdup_printf is not needed here. +--- + src/vfs/vfs-app-desktop.c | 10 +++++++--- + 1 file changed, 7 insertions(+), 3 deletions(-) + +diff --git a/src/vfs/vfs-app-desktop.c b/src/vfs/vfs-app-desktop.c +index cec43d8..161f4f4 100644 +--- a/src/vfs/vfs-app-desktop.c ++++ b/src/vfs/vfs-app-desktop.c +@@ -583,8 +583,12 @@ gboolean vfs_app_desktop_open_files( GdkScreen* screen, + return TRUE; + } + +- cmd = g_strdup_printf( "%s\n\n%s", _("Command not found"), app->file_name ); +- g_set_error( err, G_SPAWN_ERROR, G_SPAWN_ERROR_FAILED, cmd ); +- g_free( cmd ); ++ g_set_error( err, ++ G_SPAWN_ERROR, ++ G_SPAWN_ERROR_FAILED, ++ "%s\n\n%s", ++ _("Command not found"), ++ app->file_name ++ ); + return FALSE; + } +-- +1.8.5.3 + diff --git a/spacefm.spec b/spacefm.spec index faec30f..473f775 100644 --- a/spacefm.spec +++ b/spacefm.spec @@ -6,6 +6,9 @@ Summary: Multi-panel tabbed file and desktop manager License: GPLv3+ URL: http://ignorantguru.github.io/spacefm/ Source0: http://downloads.sourceforge.net/%{name}/%{name}-%{version}.tar.xz +# https://github.com/IgnorantGuru/spacefm/issues/416 +# Fix compilation with -Werror=format-security +Patch0: spacefm-0.9.3-Fix-compilation-with-Werror-format-security.patch BuildRequires: desktop-file-utils BuildRequires: gettext @@ -35,6 +38,7 @@ This package contains Faenza theme files for spacefm. %prep %setup -q +%patch0 -p1 -b .format.security find . -name \*.c -print0 | xargs --null chmod 0644 %build