From 370592cd702a2c135ba4accfcbe9e1a63c3b6166 Mon Sep 17 00:00:00 2001 From: Niels de Vos Date: Thu, 28 Aug 2014 10:46:50 +0200 Subject: build: fixes for compiling with -Werror=format-security Nightly builds on Fedora Rawhide (x86_64 and i686) started to fail with the following error: cli-rpc-ops.c: In function 'gf_cli_get_vol_opt_cbk': cli-rpc-ops.c:9339:25: error: format not a string literal and no format arguments [-Werror=format-security] cli_err (msg); ^ The cli_err() should be called with a format-string like "%s" to prevent unexpected errors. Change-Id: I6a287795fb8b7a305c8f14323456eeabf68d100c BUG: 1134773 Signed-off-by: Niels de Vos Reviewed-on: http://review.gluster.org/8560 Reviewed-by: Harshavardhana Reviewed-by: Atin Mukherjee Tested-by: Gluster Build System Reviewed-by: Humble Devassy Chirammal Reviewed-by: Kaleb KEITHLEY --- cli/src/cli-rpc-ops.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index ed3faf70c39..ba8ba6810d6 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -9336,7 +9336,7 @@ gf_cli_get_vol_opt_cbk (struct rpc_req *req, struct iovec *iov, int count, "Error outputting to xml"); } } else { - cli_err (msg); + cli_err ("%s", msg); } ret = 0; /* setting ret to 0 ensures we do not end up displaying double error messages */ -- cgit