summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Scherer <misc@redhat.com>2017-02-24 12:41:45 +0100
committerShyamsundar Ranganathan <srangana@redhat.com>2017-02-26 11:31:25 -0500
commitd9172b961b85fc2e5431b2970521709680166fe1 (patch)
tree54e3126f7711335b256a165c9c69de198547107a
parent235ae3528d4e8a914fc208ff05580336c865727c (diff)
dnt: Add a GF_DEFRAG_CMD_NONE to gf_defrag_type
Coverity complain about enum mismatch since we assign GF_OP_CMD_NONE to a variable holding gf_defrag_type. Change-Id: I63e71f552b3cc752c26c1b8705420f38908e17e6 BUG: 789278 Signed-off-by: Michael Scherer <misc@redhat.com> Reviewed-on: https://review.gluster.org/16756 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com> Tested-by: Michael Scherer <misc@fedoraproject.org> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
-rw-r--r--cli/src/cli-cmd-parser.c4
-rw-r--r--xlators/cluster/dht/src/dht-common.h1
2 files changed, 3 insertions, 2 deletions
diff --git a/cli/src/cli-cmd-parser.c b/cli/src/cli-cmd-parser.c
index d234ad09c4e..e50d9f66f91 100644
--- a/cli/src/cli-cmd-parser.c
+++ b/cli/src/cli-cmd-parser.c
@@ -1845,7 +1845,7 @@ cli_cmd_volume_tier_parse (const char **words, int wordcount,
dict_t *dict = NULL;
char *volname = NULL;
int ret = -1;
- int32_t command = GF_OP_CMD_NONE;
+ int32_t command = GF_DEFRAG_CMD_NONE;
int32_t is_force = 0;
GF_ASSERT (words);
@@ -1926,7 +1926,7 @@ cli_cmd_volume_detach_tier_parse (const char **words, int wordcount,
int ret = -1;
char *word = NULL;
dict_t *dict = NULL;
- int32_t command = GF_OP_CMD_NONE;
+ int32_t command = GF_DEFRAG_CMD_NONE;
dict = dict_new ();
if (!dict)
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index ffe53d99ce1..4e9f02cf256 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -320,6 +320,7 @@ struct dht_du {
typedef struct dht_du dht_du_t;
enum gf_defrag_type {
+ GF_DEFRAG_CMD_NONE = 0,
GF_DEFRAG_CMD_START = 1,
GF_DEFRAG_CMD_STOP = 1 + 1,
GF_DEFRAG_CMD_STATUS = 1 + 2,