From 51c4002030da6b1a11f6e8f48bf117084b1da34d Mon Sep 17 00:00:00 2001 From: Yaniv Kaul Date: Thu, 26 Dec 2019 09:29:00 +0200 Subject: Remove some compiler warnings when not compiling gNFS As a follow up to https://review.gluster.org/#/c/glusterfs/+/23799/ When compiling without gNFS, there were some 'unused' warnings by the compiler. This patch fixes them. Change-Id: I621562261f53950e821a450e0e7da304d00ae557 updates: bz#1193929 Signed-off-by: Yaniv Kaul --- xlators/mgmt/glusterd/src/glusterd-volgen.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-volgen.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c index 61bc59782ed..45f6d7ab32e 100644 --- a/xlators/mgmt/glusterd/src/glusterd-volgen.c +++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c @@ -1120,6 +1120,7 @@ get_vol_transport_type(glusterd_volinfo_t *volinfo, char *tt) transport_type_to_str(volinfo->transport_type, tt); } +#ifdef BUILD_GNFS /* If no value has specified for tcp,rdma volume from cli * use tcp as default value.Otherwise, use transport type * mentioned in volinfo @@ -1135,6 +1136,7 @@ get_vol_nfs_transport_type(glusterd_volinfo_t *volinfo, char *tt) } else transport_type_to_str(volinfo->transport_type, tt); } +#endif /* gets the volinfo, dict, a character array for filling in * the transport type and a boolean option which says whether @@ -3878,7 +3880,6 @@ static int client_graph_set_perf_options(volgen_graph_t *graph, glusterd_volinfo_t *volinfo, dict_t *set_dict) { - data_t *tmp_data = NULL; char *volname = NULL; int ret = 0; @@ -3911,6 +3912,7 @@ client_graph_set_perf_options(volgen_graph_t *graph, volname = volinfo->volname; #ifdef BUILD_GNFS + data_t *tmp_data = NULL; tmp_data = dict_get_sizen(set_dict, "nfs-volume-file"); if (!tmp_data) return volgen_graph_set_options_generic(graph, set_dict, volinfo, -- cgit