[fgrun] Prevent build failure with -Werror=format-security (bug #1037061).

Fabrice Bellet bellet at fedoraproject.org
Wed Dec 11 19:42:30 UTC 2013


commit da44bfca13feaee1a59ed506ea030f32e815748f
Author: Fabrice Bellet <fabrice at bellet.info>
Date:   Wed Dec 11 20:42:09 2013 +0100

    Prevent build failure with -Werror=format-security (bug #1037061).

 0006-Fix-for-gcc-format-security-flag.patch |   25 +++++++++++++++++++++++++
 fgrun.spec                                  |    7 ++++++-
 2 files changed, 31 insertions(+), 1 deletions(-)
---
diff --git a/0006-Fix-for-gcc-format-security-flag.patch b/0006-Fix-for-gcc-format-security-flag.patch
new file mode 100644
index 0000000..5f98586
--- /dev/null
+++ b/0006-Fix-for-gcc-format-security-flag.patch
@@ -0,0 +1,25 @@
+From 194e85137f0a799f3ef2c0e733ade659212900b7 Mon Sep 17 00:00:00 2001
+From: Fabrice Bellet <fabrice at bellet.info>
+Date: Wed, 11 Dec 2013 20:25:16 +0100
+Subject: [PATCH 6/6] Fix for gcc format-security flag
+
+---
+ src/wizard_funcs.cxx | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/wizard_funcs.cxx b/src/wizard_funcs.cxx
+index 59be533..33bac8d 100644
+--- a/src/wizard_funcs.cxx
++++ b/src/wizard_funcs.cxx
+@@ -791,7 +791,7 @@ Wizard::preview_aircraft(bool desel_mru)
+         }
+         catch (const sg_exception& exc )
+         {
+-            fl_alert( exc.getFormattedMessage().c_str() );
++            fl_alert( "%s", exc.getFormattedMessage().c_str() );
+             return;
+         }
+         catch (...)
+-- 
+1.8.4.2
+
diff --git a/fgrun.spec b/fgrun.spec
index 2900bd5..772ea04 100644
--- a/fgrun.spec
+++ b/fgrun.spec
@@ -1,7 +1,7 @@
 Name:           fgrun
 Summary:        Graphical front-end for launching FlightGear flight simulator
 Version:        1.7.0
-Release:        1%{?dist}
+Release:        2%{?dist}
 License:        GPLv2+ and CC-BY-SA
 Group:          Amusements/Games
 URL:            http://sourceforge.net/projects/fgrun
@@ -23,6 +23,7 @@ Patch2:         0002-Fix-a-crash-when-setting-defaults.patch
 Patch3:         0003-Default-settings-for-Fedora.patch
 Patch4:         0004-Fix-reloadPath-logic.patch
 Patch5:         0005-Update-required-SimGear-version.patch
+Patch6:         0006-Fix-for-gcc-format-security-flag.patch
 Buildroot:      %{_tmppath}/%{name}-%{version}-%{release}-root
 Requires:       FlightGear, opengl-games-utils, hicolor-icon-theme
 BuildRequires:  SimGear-devel >= 2.6.0
@@ -42,6 +43,7 @@ FlightGear flight simulator
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+%patch6 -p1
 cp -a %{SOURCE2} .
 
 %build 
@@ -111,6 +113,9 @@ rm -fr %{buildroot}
 %{_datadir}/icons/hicolor/*/apps/*
 
 %changelog 
+* Wed Dec 11 2013 Fabrice Bellet <fabrice at bellet.info> - 1.7.0-2
+- Prevent build failure with -Werror=format-security (bug #1037061).
+
 * Sun Sep 22 2013 Fabrice Bellet <fabrice at bellet.info> - 1.7.0-1
 - new upstream release
 


More information about the scm-commits mailing list