From 75ad1dd5ef98053be1fd1e8aa4a1fef1ac32ef3a Mon Sep 17 00:00:00 2001 From: Vijay Bellur Date: Wed, 30 Nov 2016 12:54:05 -0500 Subject: cli: Suppress unused but set warnings MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit GCC has the following complaint during compilation: ../../../cli/src/cli-rpc-ops.c: In function ‘gf_cli_get_volume_cbk’: ../../../cli/src/cli-rpc-ops.c:846:36: warning: variable ‘caps’ set but not used [-Wunused-but-set-variable] char *caps = NULL; Change-Id: Ia378a6c83ba70ae35290802b7b38ad2830c0956c BUG: 1402261 Signed-off-by: Vijay Bellur Reviewed-on: http://review.gluster.org/15982 NetBSD-regression: NetBSD Build System CentOS-regression: Gluster Build System Smoke: Gluster Build System Reviewed-by: Atin Mukherjee --- cli/src/cli-xml-output.c | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) (limited to 'cli/src/cli-xml-output.c') diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c index af4f020bbbd..fe03ea17265 100644 --- a/cli/src/cli-xml-output.c +++ b/cli/src/cli-xml-output.c @@ -2602,7 +2602,7 @@ cli_xml_output_vol_info (cli_local_t *local, dict_t *dict) char key[1024] = {0,}; int i = 0; int j = 1; - char *caps = NULL; + char *caps __attribute__((unused)) = NULL; int k __attribute__((unused)) = 0; int index = 1; int tier_vol_type = 0; @@ -2832,8 +2832,6 @@ cli_xml_output_vol_info (cli_local_t *local, dict_t *dict) ret = xmlTextWriterFullEndElement (local->writer); XML_RET_CHECK_AND_GOTO (ret, out); /* */ -#else - caps = 0; /* Avoid compiler warnings when BD not enabled */ #endif j = 1; -- cgit