summaryrefslogtreecommitdiffstats
path: root/xlators/features/index/src/index.c
diff options
context:
space:
mode:
authorRavishankar N <ravishankar@redhat.com>2016-05-13 12:41:39 +0530
committerKaleb KEITHLEY <kkeithle@redhat.com>2016-05-13 15:06:12 -0700
commit137bd83029458ecd461718a891c74cd1afd8f6cb (patch)
treef620f41ed70399dea452f78d69ebbd763fa2ddf3 /xlators/features/index/src/index.c
parent60d235515e582319474ba7231aad490d19240642 (diff)
index: Fix compiler warning
Problem: ---------------------------- index.c:420:18: warning: comparison of unsigned enum expression < 0 is always false [-Wtautological-compare] if (type < 0 || type >= XATTROP_TYPE_END) ~~~~ ^ ~ 1 warning generated. ---------------------------- Fix: Do a type cast before comparing. Change-Id: I65911a05de5f8b5634f1e8cf359c38dad7d125aa BUG: 1335232 Signed-off-by: Ravishankar N <ravishankar@redhat.com> Reviewed-on: http://review.gluster.org/14318 Reviewed-by: Pranith Kumar Karampuri <pkarampu@redhat.com> Smoke: Gluster Build System <jenkins@build.gluster.com> NetBSD-regression: NetBSD Build System <jenkins@build.gluster.org> CentOS-regression: Gluster Build System <jenkins@build.gluster.com>
Diffstat (limited to 'xlators/features/index/src/index.c')
-rw-r--r--xlators/features/index/src/index.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/xlators/features/index/src/index.c b/xlators/features/index/src/index.c
index 41d21c50abe..12203f82c56 100644
--- a/xlators/features/index/src/index.c
+++ b/xlators/features/index/src/index.c
@@ -417,7 +417,7 @@ index_dec_link_count (index_priv_t *priv, index_xattrop_type_t type)
char*
index_get_subdir_from_type (index_xattrop_type_t type)
{
- if (type < 0 || type >= XATTROP_TYPE_END)
+ if ((int)type < 0 || (int)type >= (int)XATTROP_TYPE_END)
return NULL;
return index_subdirs[type];
}