summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src
diff options
context:
space:
mode:
authorXavi Hernandez <xhernandez@redhat.com>2018-09-25 13:22:47 +0200
committerAmar Tumballi <amarts@redhat.com>2018-10-10 05:50:29 +0000
commit2d96ce8faa277809c0c94aca54320483889f577d (patch)
tree999ef8b148b186e6bf74bb22c3ff670fc6e34d38 /xlators/mgmt/glusterd/src
parent0cda00f08d3d620be89830bad9d0e252648388e9 (diff)
all: fix warnings on non 64-bits architectures
When compiling in other architectures there appear many warnings. Some of them are actual problems that prevent gluster to work correctly on those architectures. Change-Id: Icdc7107a2bc2da662903c51910beddb84bdf03c0 fixes: bz#1632717 Signed-off-by: Xavi Hernandez <xhernandez@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c4
3 files changed, 6 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
index ec0d4c99b11..19ccefa7d2f 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot-utils.c
@@ -1518,6 +1518,7 @@ glusterd_import_friend_snap(dict_t *peer_data, int32_t snap_count,
int32_t volcount = -1;
int32_t i = -1;
xlator_t *this = NULL;
+ int64_t time_stamp;
this = THIS;
GF_ASSERT(this);
@@ -1562,12 +1563,13 @@ glusterd_import_friend_snap(dict_t *peer_data, int32_t snap_count,
}
snprintf(buf, sizeof(buf), "%s.time_stamp", prefix);
- ret = dict_get_int64(peer_data, buf, &snap->time_stamp);
+ ret = dict_get_int64(peer_data, buf, &time_stamp);
if (ret) {
gf_msg(this->name, GF_LOG_ERROR, 0, GD_MSG_DICT_GET_FAILED,
"Unable to get time_stamp for snap %s", peer_snap_name);
goto out;
}
+ snap->time_stamp = (time_t)time_stamp;
snprintf(buf, sizeof(buf), "%s.snap_restored", prefix);
ret = dict_get_int8(peer_data, buf, (int8_t *)&snap->snap_restored);
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index f2f7d54a726..a05fd6d0c98 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -363,7 +363,7 @@ gd_store_brick_snap_details_write(int fd, glusterd_brickinfo_t *brickinfo)
if (ret)
goto out;
- snprintf(value, sizeof(value), "%lu", brickinfo->statfs_fsid);
+ snprintf(value, sizeof(value), "%" PRIu64, brickinfo->statfs_fsid);
ret = gf_store_save_value(fd, GLUSTERD_STORE_KEY_BRICK_FSID, value);
out:
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 3c32cf90577..3e291e046e3 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -4061,7 +4061,7 @@ client_graph_set_rda_options(volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
else
rda_req_size = new_cache_size;
- snprintf(new_req_size_str, sizeof(new_req_size_str), "%ld%s",
+ snprintf(new_req_size_str, sizeof(new_req_size_str), "%" PRId64 "%s",
rda_req_size, "B");
ret = dict_set_dynstr_with_alloc(set_dict, VKEY_RDA_REQUEST_SIZE,
new_req_size_str);
@@ -4069,7 +4069,7 @@ client_graph_set_rda_options(volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
goto out;
}
- snprintf(new_cache_size_str, sizeof(new_cache_size_str), "%ld%s",
+ snprintf(new_cache_size_str, sizeof(new_cache_size_str), "%" PRId64 "%s",
new_cache_size, "B");
ret = dict_set_dynstr_with_alloc(set_dict, VKEY_RDA_CACHE_LIMIT,
new_cache_size_str);