summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2019-12-26 09:29:00 +0200
committerAmar Tumballi <amarts@gmail.com>2020-01-02 05:46:04 +0000
commit51c4002030da6b1a11f6e8f48bf117084b1da34d (patch)
tree9f53cbcee843be41f39bc7e50f2d0db576e6dd62
parente40d0c399333e1ef62ff104b5cd35d8a5baa75f4 (diff)
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 <ykaul@redhat.com>
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-ganesha.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c4
2 files changed, 4 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
index 0c18cc4..6207a21 100644
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
@@ -779,7 +779,6 @@ int
start_ganesha(char **op_errstr)
{
int ret = -1;
- dict_t *vol_opts = NULL;
glusterd_volinfo_t *volinfo = NULL;
glusterd_conf_t *priv = NULL;
runner_t runner = {
@@ -791,11 +790,10 @@ start_ganesha(char **op_errstr)
cds_list_for_each_entry(volinfo, &priv->volumes, vol_list)
{
- vol_opts = volinfo->dict;
#ifdef BUILD_GNFS
/* Gluster-nfs has to be disabled across the trusted pool */
/* before attempting to start nfs-ganesha */
- ret = dict_set_str(vol_opts, NFS_DISABLE_MAP_KEY, "on");
+ ret = dict_set_str_sizen(volinfo->dict, NFS_DISABLE_MAP_KEY, "on");
if (ret)
goto out;
#endif
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 61bc597..45f6d7a 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,