From 2741c0a27e23e908fe77a6c14695cbee879accd5 Mon Sep 17 00:00:00 2001 From: Louis Zuckerman Date: Fri, 6 Jan 2012 11:03:21 -0500 Subject: Fixes bug-765574, failure to build from hardened source Glusterfs 3.2.5 failed to build on Debian which prevented the Debian project from updating their package to the latest release version. There were two changes needed, in both cases just adding a printf format string argument to a call to gf_log. The compiler error was that the argument was neither a string literal nor a format string. It was instead a pointer to a string. The obvious solution was to add a format argument of "%s" before the string pointer argument. This has been tested successfully on Debian Sid. Change-Id: I62c8a46938184c8a37224c2481bd1de00369ab19 Signed-off-by: louis zuckerman Reviewed-on: http://review.gluster.com/2598 Tested-by: Gluster Build System Reviewed-by: Kaleb KEITHLEY Reviewed-by: Amar Tumballi --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 82eb6b05d..40114b501 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -4622,7 +4622,7 @@ glusterd_do_gsync_log_rotation_mst_slv (glusterd_volinfo_t *volinfo, char *slave if (ret) { snprintf(errmsg, sizeof(errmsg), "geo-replication session b/w %s %s not active", volinfo->volname, slave); - gf_log ("", GF_LOG_WARNING, errmsg); + gf_log ("", GF_LOG_WARNING, "%s", errmsg); if (op_errstr) *op_errstr = gf_strdup(errmsg); goto out; @@ -4713,7 +4713,7 @@ glusterd_rotate_gsync_logs (dict_t *dict, char **op_errstr, dict_t *rsp_dict) if ((ret) || (!exists)) { snprintf (errmsg, sizeof(errmsg), "Volume %s does not" " exist", volname); - gf_log ("", GF_LOG_WARNING, errmsg); + gf_log ("", GF_LOG_WARNING, "%s", errmsg); *op_errstr = gf_strdup (errmsg); ret = -1; goto out; -- cgit