[Bugs] [Bug 1336268] New: features/index: clang compile warnings in index.c

bugzilla at redhat.com bugzilla at redhat.com
Mon May 16 04:21:41 UTC 2016


https://bugzilla.redhat.com/show_bug.cgi?id=1336268

            Bug ID: 1336268
           Summary: features/index: clang compile warnings in index.c
           Product: GlusterFS
           Version: 3.8.0
         Component: index
          Keywords: Triaged
          Assignee: bugs at gluster.org
          Reporter: ravishankar at redhat.com
                CC: bugs at gluster.org, kkeithle at redhat.com
        Depends On: 1335232



+++ This bug was initially created as a clone of Bug #1335232 +++

Description of problem:

Making all in index
Making all in src
  CC       index.lo
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.



Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

--- Additional comment from Vijay Bellur on 2016-05-13 01:29:14 EDT ---

REVIEW: http://review.gluster.org/14318 (index: Fix compiler warning) posted
(#1) for review on master by Ravishankar N (ravishankar at redhat.com)

--- Additional comment from Vijay Bellur on 2016-05-13 03:12:59 EDT ---

REVIEW: http://review.gluster.org/14318 (index: Fix compiler warning) posted
(#2) for review on master by Ravishankar N (ravishankar at redhat.com)

--- Additional comment from Vijay Bellur on 2016-05-13 18:06:15 EDT ---

COMMIT: http://review.gluster.org/14318 committed in master by Kaleb KEITHLEY
(kkeithle at redhat.com) 
------
commit 137bd83029458ecd461718a891c74cd1afd8f6cb
Author: Ravishankar N <ravishankar at redhat.com>
Date:   Fri May 13 12:41:39 2016 +0530

    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 at redhat.com>
    Reviewed-on: http://review.gluster.org/14318
    Reviewed-by: Pranith Kumar Karampuri <pkarampu at redhat.com>
    Smoke: Gluster Build System <jenkins at build.gluster.com>
    NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins at build.gluster.com>


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1335232
[Bug 1335232] features/index: clang compile warnings in index.c
-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list