diff options
author | Vijay Bellur <vbellur@redhat.com> | 2016-11-30 12:54:05 -0500 |
---|---|---|
committer | Atin Mukherjee <amukherj@redhat.com> | 2016-12-14 10:21:04 -0800 |
commit | 75ad1dd5ef98053be1fd1e8aa4a1fef1ac32ef3a (patch) | |
tree | 03fb38a3a0f6addca7af7d11fff840d25a3d2a30 /cli/src | |
parent | e81fd0b85c8dd3f521e54e32b7da2f99a513f2f2 (diff) |
cli: Suppress unused but set warnings
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 <vbellur@redhat.com>
Reviewed-on: http://review.gluster.org/15982
NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org>
CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
Smoke: Gluster Build System <jenkins@build.gluster.org>
Reviewed-by: Atin Mukherjee <amukherj@redhat.com>
Diffstat (limited to 'cli/src')
-rw-r--r-- | cli/src/cli-rpc-ops.c | 4 | ||||
-rw-r--r-- | cli/src/cli-xml-output.c | 4 |
2 files changed, 2 insertions, 6 deletions
diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index c6801e6a746..53f5ef36a1f 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -843,7 +843,7 @@ gf_cli_get_volume_cbk (struct rpc_req *req, struct iovec *iov, char key[1024] = {0}; char err_str[2048] = {0}; gf_cli_rsp rsp = {0}; - char *caps = NULL; + char *caps __attribute__((unused)) = NULL; int k __attribute__((unused)) = 0; call_frame_t *frame = NULL; @@ -1064,8 +1064,6 @@ xml_output: } while (1); next: -#else - caps = 0; /* Avoid compiler warnings when BD not enabled */ #endif gf_cli_print_number_of_bricks (type, brick_count, dist_count, stripe_count, replica_count, 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); /* </xlators> */ -#else - caps = 0; /* Avoid compiler warnings when BD not enabled */ #endif j = 1; |