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