[libaccounts-glib] Fix build with -Werror=format-security
Daniel Vrátil
dvratil at fedoraproject.org
Wed Feb 26 16:02:29 UTC 2014
commit ecb16a042f83d7518a0c432451b05577db8afa52
Author: Dan Vrátil <dvratil at redhat.com>
Date: Wed Feb 26 17:01:59 2014 +0100
Fix build with -Werror=format-security
libaccounts-glib-1.16-build-with-werror.patch | 13 +++++++++++++
libaccounts-glib.spec | 4 +++-
2 files changed, 16 insertions(+), 1 deletions(-)
---
diff --git a/libaccounts-glib-1.16-build-with-werror.patch b/libaccounts-glib-1.16-build-with-werror.patch
new file mode 100644
index 0000000..6517084
--- /dev/null
+++ b/libaccounts-glib-1.16-build-with-werror.patch
@@ -0,0 +1,13 @@
+diff --git a/libaccounts-glib/ag-provider.c b/libaccounts-glib/ag-provider.c
+index 426cb2c..187614b 100644
+--- a/libaccounts-glib/ag-provider.c
++++ b/libaccounts-glib/ag-provider.c
+@@ -441,7 +441,7 @@ ag_provider_get_plugin_name (AgProvider *provider)
+ gboolean
+ ag_provider_get_single_account (AgProvider *provider)
+ {
+- g_return_val_if_fail (provider != NULL, NULL);
++ g_return_val_if_fail (provider != NULL, FALSE);
+ return provider->single_account;
+ }
+
diff --git a/libaccounts-glib.spec b/libaccounts-glib.spec
index e425ebb..6eb52f7 100644
--- a/libaccounts-glib.spec
+++ b/libaccounts-glib.spec
@@ -6,6 +6,7 @@ Summary: Accounts framework for Linux and POSIX based platforms
License: LGPLv2
URL: https://code.google.com/p/accounts-sso/
Source0: https://accounts-sso.googlecode.com/files/%{name}-%{version}.tar.gz
+Patch0: libaccounts-glib-1.16-build-with-werror.patch
BuildRequires: dbus-glib-devel
BuildRequires: libxml2-devel
BuildRequires: sqlite-devel
@@ -38,6 +39,8 @@ The %{name}-docs package contains documentation for %{name}.
%prep
%setup -q
+%patch0 -p1 -b .werror
+
%build
gtkdocize
autoreconf -i --force
@@ -45,7 +48,6 @@ autoreconf -i --force
%configure --disable-static \
--disable-gtk-doc
-sed -i 's/-Werror//g' libaccounts-glib/Makefile
make %{?_smp_mflags}
%install
More information about the scm-commits
mailing list