summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--cli/src/cli-cmd-parser.c4
-rw-r--r--cli/src/cli-xml-output.c41
-rw-r--r--cli/src/cli.c5
-rw-r--r--libglusterfs/src/common-utils.c9
-rw-r--r--libglusterfs/src/gfdb/gfdb_sqlite3.c4
-rw-r--r--rpc/rpc-transport/socket/src/socket.c9
-rw-r--r--xlators/cluster/afr/src/afr-transaction.c2
-rw-r--r--xlators/cluster/dht/src/dht-common.h2
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c4
-rw-r--r--xlators/debug/io-stats/src/io-stats.c2
-rw-r--r--xlators/features/barrier/src/barrier.c2
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot-scrub.h2
-rw-r--r--xlators/features/shard/src/shard.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-ganesha.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-handler.c6
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.h3
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-syncop.c2
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volgen.c2
-rw-r--r--xlators/protocol/client/src/client-messages.h4
-rw-r--r--xlators/storage/bd/src/bd-helper.c4
-rw-r--r--xlators/storage/bd/src/bd.c2
-rw-r--r--xlators/storage/posix/src/posix.c2
24 files changed, 65 insertions, 56 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index 69b94863c15..9439724f3df 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -2834,8 +2834,8 @@ cli_cmd_volume_top_parse (const char **words, int wordcount,
int32_t list_cnt = -1;
int index = 0;
int perf = 0;
- int32_t blk_size = 0;
- uint32_t count = 0;
+ int32_t blk_size = 0;
+ int count = 0;
gf_boolean_t nfs = _gf_false;
char *delimiter = NULL;
char *opwords[] = { "open", "read", "write", "opendir",
diff --git a/cli/src/cli-xml-output.c b/cli/src/cli-xml-output.c
index f7ae0578b15..0f501782f25 100644
--- a/cli/src/cli-xml-output.c
+++ b/cli/src/cli-xml-output.c
@@ -6258,37 +6258,37 @@ cli_quota_xml_output (cli_local_t *local, char *path, int64_t hl_str,
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"path",
- "%s", path);
+ (xmlChar *)"path",
+ "%s", path);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"hard_limit",
+ (xmlChar *)"hard_limit",
!limit_set ? "N/A" :
- "%"PRIu64, hl_str);
+ "%"PRId64, hl_str);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"soft_limit_percent",
+ (xmlChar *)"soft_limit_percent",
!limit_set ? "N/A" :
"%s", sl_final);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"soft_limit_value",
+ (xmlChar *)"soft_limit_value",
!limit_set ? "N/A" :
- "%"PRIu64, sl_num);
+ "%"PRId64, sl_num);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
(xmlChar *)"used_space",
- "%"PRIu64, used);
+ "%"PRId64, used);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
(xmlChar *)"avail_space",
!limit_set ? "N/A" :
- "%"PRIu64, avail);
+ "%"PRId64, avail);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
@@ -6327,51 +6327,52 @@ cli_quota_object_xml_output (cli_local_t *local, char *path, char *sl_str,
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"path",
+ (xmlChar *)"path",
"%s", path);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"hard_limit",
+ (xmlChar *)"hard_limit",
!limit_set ? "N/A" :
- "%"PRIu64, limits->hl);
+ "%"PRId64, limits->hl);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"soft_limit_percent",
+ (xmlChar *)"soft_limit_percent",
!limit_set ? "N/A" :
"%s", sl_str);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"soft_limit_value",
+ (xmlChar *)"soft_limit_value",
!limit_set ? "N/A" :
"%"PRIu64, sl_val);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"file_count",
- "%"PRIu64,
+ (xmlChar *)"file_count",
+ "%"PRId64,
used_space->file_count);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"dir_count", "%"PRIu64,
+ (xmlChar *)"dir_count",
+ "%"PRIu64,
used_space->dir_count);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"available",
+ (xmlChar *)"available",
!limit_set ? "N/A" :
- "%"PRIu64, avail);
+ "%"PRId64, avail);
XML_RET_CHECK_AND_GOTO (ret, out);
ret = xmlTextWriterWriteFormatElement (local->writer,
- (xmlChar *)"sl_exceeded",
+ (xmlChar *)"sl_exceeded",
!limit_set ? "N/A" :
"%s", sl);
XML_RET_CHECK_AND_GOTO (ret, out);
diff --git a/cli/src/cli.c b/cli/src/cli.c
index 118a94f0b41..fbf3e89fb78 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -363,9 +363,10 @@ cli_opt_parse (char *opt, struct cli_state *state)
oarg = strtail (opt, "log-level=");
if (oarg) {
- state->log_level = glusterd_check_log_level(oarg);
- if (state->log_level == -1)
+ int log_level = glusterd_check_log_level(oarg);
+ if (log_level == -1)
return -1;
+ state->log_level = (gf_loglevel_t) log_level;
return 0;
}
diff --git a/libglusterfs/src/common-utils.c b/libglusterfs/src/common-utils.c
index a9e74cb895a..cf5b524dc12 100644
--- a/libglusterfs/src/common-utils.c
+++ b/libglusterfs/src/common-utils.c
@@ -1581,11 +1581,12 @@ err:
}
int
-gf_string2bytesize_range (const char *str, uint64_t *n, uint64_t max)
+gf_string2bytesize_range (const char *str, uint64_t *n, uint64_t umax)
{
double value = 0.0;
- uint64_t int_value = 0;
+ int64_t int_value = 0;
uint64_t unit = 0;
+ int64_t max = 0;
char *tail = NULL;
int old_errno = 0;
const char *s = NULL;
@@ -1598,6 +1599,8 @@ gf_string2bytesize_range (const char *str, uint64_t *n, uint64_t max)
return -1;
}
+ max = umax & 0x7fffffffffffffffLL;
+
for (s = str; *s != '\0'; s++) {
if (isspace (*s))
continue;
@@ -2114,7 +2117,7 @@ get_nth_word (const char *str, int n)
if (!end)
goto out;
- word_len = abs (end - start);
+ word_len = labs (end - start);
word = GF_CALLOC (1, word_len + 1, gf_common_mt_strdup);
if (!word)
diff --git a/libglusterfs/src/gfdb/gfdb_sqlite3.c b/libglusterfs/src/gfdb/gfdb_sqlite3.c
index a2060fba7af..71d12db72c8 100644
--- a/libglusterfs/src/gfdb/gfdb_sqlite3.c
+++ b/libglusterfs/src/gfdb/gfdb_sqlite3.c
@@ -106,7 +106,7 @@ gf_sql_auto_vacuum_t
gf_sql_str2av_t (const char *av_str)
{
if (!av_str) {
- return gf_sql_sync_invalid;
+ return gf_sql_av_invalid;
} else if (strcmp (av_str, GF_SQL_AV_NONE) == 0) {
return gf_sql_av_none;
} else if (strcmp (av_str, GF_SQL_AV_FULL) == 0) {
@@ -114,7 +114,7 @@ gf_sql_str2av_t (const char *av_str)
} else if (strcmp (av_str, GF_SQL_AV_INCR) == 0) {
return gf_sql_av_incr;
}
- return gf_sql_sync_invalid;
+ return gf_sql_av_invalid;
}
const char *
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index 3ee0c2c75a8..eb3a2d32ba4 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -1806,7 +1806,7 @@ __socket_read_vectored_reply (rpc_transport_t *this)
|| ((ret == 0) && (remaining_size == 0)
&& (RPC_LASTFRAG (in->fraghdr)))) {
frag->call_body.reply.status_state
- = SP_STATE_ACCEPTED_REPLY_INIT;
+ = SP_STATE_VECTORED_REPLY_STATUS_INIT;
in->payload_vector.iov_len
= (unsigned long)frag->fragcurrent
- (unsigned long)in->payload_vector.iov_base;
@@ -1942,7 +1942,7 @@ __socket_read_frag (rpc_transport_t *this)
ret = __socket_read_request (this);
} else if (in->msg_type == REPLY) {
ret = __socket_read_reply (this);
- } else if (in->msg_type == GF_UNIVERSAL_ANSWER) {
+ } else if (in->msg_type == (msg_type_t) GF_UNIVERSAL_ANSWER) {
gf_log ("rpc", GF_LOG_ERROR,
"older version of protocol/process trying to "
"connect from %s. use newer version on that node",
@@ -1960,7 +1960,8 @@ __socket_read_frag (rpc_transport_t *this)
if ((ret == -1)
|| ((ret == 0) && (remaining_size == 0)
&& (RPC_LASTFRAG (in->fraghdr)))) {
- frag->state = SP_STATE_NADA;
+ /* frag->state = SP_STATE_NADA; */
+ frag->state = SP_STATE_RPCFRAG_INIT;
}
break;
@@ -2291,7 +2292,7 @@ socket_connect_finish (rpc_transport_t *this)
"getsockname on (%d) failed (%s)",
priv->sock, strerror (errno));
__socket_disconnect (this);
- event = GF_EVENT_POLLERR;
+ event = RPC_TRANSPORT_DISCONNECT;
goto unlock;
}
diff --git a/xlators/cluster/afr/src/afr-transaction.c b/xlators/cluster/afr/src/afr-transaction.c
index 4c85a4b0d03..92f68b91113 100644
--- a/xlators/cluster/afr/src/afr-transaction.c
+++ b/xlators/cluster/afr/src/afr-transaction.c
@@ -1401,7 +1401,7 @@ afr_lock_rec (call_frame_t *frame, xlator_t *this)
case AFR_ENTRY_TRANSACTION:
int_lock->lk_basename = local->transaction.basename;
- if (&local->transaction.parent_loc)
+ if (local->transaction.parent_loc.path)
int_lock->lk_loc = &local->transaction.parent_loc;
else
GF_ASSERT (local->fd);
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index 22855b9425c..d9b52e28bb9 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -441,7 +441,7 @@ struct dht_conf {
int *last_event;
dht_layout_t **file_layouts;
dht_layout_t **dir_layouts;
- gf_boolean_t search_unhashed;
+ unsigned int search_unhashed;
gf_boolean_t lookup_optimize;
int gen;
dht_du_t *du_stats;
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index d7ee74224c6..1eef4bdb59e 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -442,7 +442,9 @@ dht_distribution_type (xlator_t *this, dht_layout_t *layout)
}
range = layout->list[i].stop - layout->list[i].start;
- diff = abs (range - start_range);
+ diff = (range >= start_range)
+ ? range - start_range
+ : start_range - range;
if ((range != 0) && (diff > layout->cnt)) {
type = GF_DHT_WEIGHTED_DISTRIBUTION;
diff --git a/xlators/debug/io-stats/src/io-stats.c b/xlators/debug/io-stats/src/io-stats.c
index eb604ea929b..79e97786581 100644
--- a/xlators/debug/io-stats/src/io-stats.c
+++ b/xlators/debug/io-stats/src/io-stats.c
@@ -1017,7 +1017,7 @@ _io_stats_write_latency_sample (xlator_t *this, ios_sample_t *sample,
epoch_time = (sample->timestamp).tv_sec +
((sample->timestamp).tv_usec / 1000000.0);
- if (!sample->identifier || (strlen (sample->identifier) == 0)) {
+ if (strlen (sample->identifier) == 0) {
hostname = "Unknown";
port = "Unknown";
} else {
diff --git a/xlators/features/barrier/src/barrier.c b/xlators/features/barrier/src/barrier.c
index f3f62d6c2d9..ce3a255d93e 100644
--- a/xlators/features/barrier/src/barrier.c
+++ b/xlators/features/barrier/src/barrier.c
@@ -473,7 +473,7 @@ notify (xlator_t *this, int event, void *data, ...)
dict_t *dict = NULL;
gf_boolean_t past = _gf_false;
int ret = -1;
- gf_boolean_t barrier_enabled = _gf_false;
+ int barrier_enabled = _gf_false;
struct list_head queue = {0,};
priv = this->private;
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.h b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.h
index e730582f1f8..b27decd41c1 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot-scrub.h
+++ b/xlators/features/bit-rot/src/bitd/bit-rot-scrub.h
@@ -8,7 +8,7 @@
cases as published by the Free Software Foundation.
*/
-#ifndef __BIT_ROT__SCRUB_H__
+#ifndef __BIT_ROT_SCRUB_H__
#define __BIT_ROT_SCRUB_H__
#include "xlator.h"
diff --git a/xlators/features/shard/src/shard.c b/xlators/features/shard/src/shard.c
index 19a07d29562..03d3449b49a 100644
--- a/xlators/features/shard/src/shard.c
+++ b/xlators/features/shard/src/shard.c
@@ -1475,7 +1475,7 @@ shard_truncate_do (call_frame_t *frame, xlator_t *this)
local = frame->local;
- if ((local->num_blocks == 1)) {
+ if (local->num_blocks == 1) {
/* This means that there are no shards to be unlinked.
* The fop boils down to truncating the last shard, updating
* the size and unwinding.
diff --git a/xlators/mgmt/glusterd/src/glusterd-ganesha.c b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
index d5e521d90bb..de1c33df5bf 100644
--- a/xlators/mgmt/glusterd/src/glusterd-ganesha.c
+++ b/xlators/mgmt/glusterd/src/glusterd-ganesha.c
@@ -240,7 +240,7 @@ glusterd_op_stage_set_ganesha (dict_t *dict, char **op_errstr)
int ret = -1;
char *volname = NULL;
int exists = 0;
- gf_boolean_t value = _gf_false;
+ int value = -1;
gf_boolean_t option = _gf_false;
char *str = NULL;
int dict_count = 0;
diff --git a/xlators/mgmt/glusterd/src/glusterd-handler.c b/xlators/mgmt/glusterd/src/glusterd-handler.c
index c86587f6fbf..4a81ce25085 100644
--- a/xlators/mgmt/glusterd/src/glusterd-handler.c
+++ b/xlators/mgmt/glusterd/src/glusterd-handler.c
@@ -856,7 +856,7 @@ __glusterd_handle_cluster_lock (rpcsvc_request_t *req)
int32_t ret = -1;
gd1_mgmt_cluster_lock_req lock_req = {{0},};
glusterd_op_lock_ctx_t *ctx = NULL;
- glusterd_op_t op = GD_OP_EVENT_LOCK;
+ glusterd_op_sm_event_type_t op = GD_OP_EVENT_LOCK;
glusterd_op_info_t txn_op_info = {{0},};
glusterd_conf_t *priv = NULL;
uuid_t *txn_id = NULL;
@@ -947,9 +947,9 @@ glusterd_handle_cluster_lock (rpcsvc_request_t *req)
__glusterd_handle_cluster_lock);
}
-int
+static int
glusterd_req_ctx_create (rpcsvc_request_t *rpc_req,
- glusterd_op_t op, uuid_t uuid,
+ int op, uuid_t uuid,
char *buf_val, size_t buf_len,
gf_gld_mem_types_t mem_type,
glusterd_req_ctx_t **req_ctx_out)
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 076ae8ef56b..ea1400d7637 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -145,7 +145,7 @@ glusterd_txn_opinfo_dict_fini ()
void
glusterd_txn_opinfo_init (glusterd_op_info_t *opinfo,
- glusterd_op_sm_state_info_t *state, glusterd_op_t *op,
+ glusterd_op_sm_state_info_t *state, int *op,
dict_t *op_ctx, rpcsvc_request_t *req)
{
glusterd_conf_t *conf = NULL;
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.h b/xlators/mgmt/glusterd/src/glusterd-op-sm.h
index 454181d188f..19b1bd97e04 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.h
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.h
@@ -91,7 +91,8 @@ struct glusterd_op_info_ {
int32_t pending_count;
int32_t brick_pending_count;
int32_t op_count;
- glusterd_op_t op;
+ /* op is an enum, glusterd_op_t or glusterd_op_sm_state_info_t */
+ int op;
struct cds_list_head op_peers;
void *op_ctx;
rpcsvc_request_t *req;
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index cb1c8e951e5..e2b0ea21501 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -1196,7 +1196,7 @@ snap_max_hard_limits_validate (dict_t *dict, char *volname,
max_limit = opt_hard_max;
}
- if ((value < 0) || (value > max_limit)) {
+ if (value > max_limit) {
ret = -1;
snprintf (err_str, PATH_MAX, "Invalid snap-max-hard-limit "
"%"PRIu64 ". Expected range 1 - %"PRIu64,
@@ -1289,7 +1289,7 @@ glusterd_snapshot_config_prevalidate (dict_t *dict, char **op_errstr,
if (soft_limit) {
max_limit = GLUSTERD_SNAPS_MAX_SOFT_LIMIT_PERCENT;
- if ((soft_limit < 0) || (soft_limit > max_limit)) {
+ if (soft_limit > max_limit) {
ret = -1;
snprintf (err_str, PATH_MAX, "Invalid "
"snap-max-soft-limit ""%"
diff --git a/xlators/mgmt/glusterd/src/glusterd-syncop.c b/xlators/mgmt/glusterd/src/glusterd-syncop.c
index a0b856160c9..ac4870d516c 100644
--- a/xlators/mgmt/glusterd/src/glusterd-syncop.c
+++ b/xlators/mgmt/glusterd/src/glusterd-syncop.c
@@ -1720,7 +1720,7 @@ gd_sync_task_begin (dict_t *op_ctx, rpcsvc_request_t * req)
int op_ret = -1;
dict_t *req_dict = NULL;
glusterd_conf_t *conf = NULL;
- glusterd_op_t op = 0;
+ glusterd_op_t op = GD_OP_NONE;
int32_t tmp_op = 0;
char *op_errstr = NULL;
char *tmp = NULL;
diff --git a/xlators/mgmt/glusterd/src/glusterd-volgen.c b/xlators/mgmt/glusterd/src/glusterd-volgen.c
index 3df4b3556cf..c808b07cbf2 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volgen.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volgen.c
@@ -3906,7 +3906,7 @@ client_graph_builder (volgen_graph_t *graph, glusterd_volinfo_t *volinfo,
char *tmp = NULL;
gf_boolean_t var = _gf_false;
gf_boolean_t ob = _gf_false;
- gf_boolean_t uss_enabled = _gf_false;
+ int uss_enabled = -1;
xlator_t *this = THIS;
GF_ASSERT (this);
diff --git a/xlators/protocol/client/src/client-messages.h b/xlators/protocol/client/src/client-messages.h
index 923917643bf..0fc9d31729c 100644
--- a/xlators/protocol/client/src/client-messages.h
+++ b/xlators/protocol/client/src/client-messages.h
@@ -9,7 +9,7 @@
*/
#ifndef _PC_MESSAGES_H__
-#define _PC_MESSAGES_H_
+#define _PC_MESSAGES_H__
#ifndef _CONFIG_H
#define _CONFIG_H
@@ -621,4 +621,4 @@
/*------------*/
#define glfs_msg_end_x GLFS_MSGID_END, "Invalid: End of messages"
-#endif /* !_PC_MESSAGES_H_ */
+#endif /* !_PC_MESSAGES_H__ */
diff --git a/xlators/storage/bd/src/bd-helper.c b/xlators/storage/bd/src/bd-helper.c
index 8b4536f49d9..15f83d3f834 100644
--- a/xlators/storage/bd/src/bd-helper.c
+++ b/xlators/storage/bd/src/bd-helper.c
@@ -1010,9 +1010,9 @@ bd_do_zerofill(call_frame_t *frame, xlator_t *this, fd_t *fd,
}
}
- memcpy (&prebuf, &bdatt->iatt, sizeof (prebuf));
+ memcpy (prebuf, &bdatt->iatt, sizeof (struct iatt));
bd_update_amtime (&bdatt->iatt, GF_SET_ATTR_MTIME);
- memcpy (&postbuf, &bdatt->iatt, sizeof (postbuf));
+ memcpy (postbuf, &bdatt->iatt, sizeof (struct iatt));
out:
diff --git a/xlators/storage/bd/src/bd.c b/xlators/storage/bd/src/bd.c
index 115b01d4ea6..6c1d2a29308 100644
--- a/xlators/storage/bd/src/bd.c
+++ b/xlators/storage/bd/src/bd.c
@@ -120,7 +120,7 @@ bd_lookup_cbk (call_frame_t *frame, void *cookie, xlator_t *this, int op_ret,
int ret = -1;
bd_attr_t *bdatt = NULL;
uint64_t size = 0;
- char *type = BD_TYPE_NONE;
+ char *type = NULL;
/* only regular files are part of BD object */
if (op_ret < 0 || buf->ia_type != IA_IFREG)
diff --git a/xlators/storage/posix/src/posix.c b/xlators/storage/posix/src/posix.c
index c74cf45fce1..314585ac41b 100644
--- a/xlators/storage/posix/src/posix.c
+++ b/xlators/storage/posix/src/posix.c
@@ -3516,7 +3516,7 @@ posix_setxattr (call_frame_t *frame, xlator_t *this,
char *acl_xattr = NULL;
struct iatt stbuf = {0};
int32_t ret = 0;
- size_t acl_size = 0;
+ ssize_t acl_size = 0;
dict_t *xattr = NULL;
posix_xattr_filler_t filler = {0,};