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