From ecb16a042f83d7518a0c432451b05577db8afa52 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dan=20Vr=C3=A1til?= Date: Wed, 26 Feb 2014 17:01:59 +0100 Subject: [PATCH] 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 deletion(-) create mode 100644 libaccounts-glib-1.16-build-with-werror.patch 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