Blame SOURCES/0001-Fix-errors-with-Werror-format-security.patch

020281
From 9317afc8bb7eec656444fc2eecfcd1ea3bfdda82 Mon Sep 17 00:00:00 2001
020281
From: Stephen Gallagher <sgallagh@redhat.com>
020281
Date: Wed, 15 Mar 2017 12:43:03 -0400
020281
Subject: [PATCH] Fix errors with -Werror=format-security
020281
020281
Recent versions of the Fedora build system treat format-security
020281
warnings as errors, resulting in failure to build. This patch
020281
ensures that appropriate format strings are present.
020281
020281
Signed-off-by: Stephen Gallagher <sgallagh@redhat.com>
020281
---
020281
 modules/files.c | 2 +-
020281
 modules/ldap.c  | 2 +-
020281
 2 files changed, 2 insertions(+), 2 deletions(-)
020281
020281
diff --git a/modules/files.c b/modules/files.c
020281
index 4ef0a57be9f2aad99d82abfae5204009a93e5572..6a7787e28112ba07e0fc44f2887ce1d1540af29e 100644
020281
--- a/modules/files.c
020281
+++ b/modules/files.c
020281
@@ -532,11 +532,11 @@ parse_field(const struct format_specifier *format, GValue *value,
020281
 	err = NULL;
020281
 	ret = lu_value_init_set_attr_from_string(value, format->attribute,
020281
 						 string, &err;;
020281
 	if (ret == FALSE) {
020281
 		g_assert(err != NULL);
020281
-		g_warning(lu_strerror(err));
020281
+		g_warning("%s", lu_strerror(err));
020281
 		lu_error_free(&err;;
020281
 	}
020281
 	return ret;
020281
 }
020281
 
020281
diff --git a/modules/ldap.c b/modules/ldap.c
020281
index ad10f7394c5735f3180cbab5bc7314301fd83ffc..02e9eb6a0cf10595d730e3dc719f2e848a3491d4 100644
020281
--- a/modules/ldap.c
020281
+++ b/modules/ldap.c
020281
@@ -670,11 +670,11 @@ lu_ldap_lookup(struct lu_module *module,
020281
 					error = NULL;
020281
 					ok = lu_value_init_set_attr_from_string
020281
 						(&value, attr, val, &error);
020281
 					if (ok == FALSE) {
020281
 						g_assert(error != NULL);
020281
-						g_warning(lu_strerror(error));
020281
+						g_warning("%s", lu_strerror(error));
020281
 						lu_error_free(&error);
020281
 					} else {
020281
 						lu_ent_add_current(ent, attr,
020281
 								   &value);
020281
 						g_value_unset(&value);
020281
-- 
020281
2.12.0
020281