usr/src/uts/common/sys/fs/zfs.h
        Change ZPROP_INVAL and ZPROP_CONT from macros to enum values.  Clang
        and GCC both prefer to use unsigned ints to store enums.  That was
        causing tautological comparison warnings (and likely eliminating
        error handling code at compile time) whenever a zfs_prop_t or
        zpool_prop_t was compared to ZPROP_INVAL or ZPROP_CONT.  Making the
        error flags be explicity enum values forces the enum types to be
        signed.

        ZPROP_INVAL was also compared against two different enum types.  I
        had to change its name to ZPOOL_PROP_INVAL whenever its compared to
        a zpool_prop_t.  There are still some places where ZPROP_INVAL or
        ZPROP_CONT is compared to a plain int, in code that doesn't know
        whether the int is storing a zfs_prop_t or a zpool_prop_t.

usr/src/uts/common/fs/zfs/spa.c
                s/ZPROP_INVAL/ZPOOL_PROP_INVAL/
You can view, comment on, or merge this pull request online at:

  https://github.com/openzfs/openzfs/pull/466

-- Commit Summary --

  * 8652 Tautological comparisons with ZPROP_INVAL

-- File Changes --

    M usr/src/uts/common/fs/zfs/spa.c (8)
    M usr/src/uts/common/sys/fs/zfs.h (7)

-- Patch Links --

https://github.com/openzfs/openzfs/pull/466.patch
https://github.com/openzfs/openzfs/pull/466.diff

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/openzfs/openzfs/pull/466

------------------------------------------
openzfs-developer
Archives: 
https://openzfs.topicbox.com/groups/developer/discussions/T031d2290d73a1432-M92eefb71dc531f2002ed4978
Powered by Topicbox: https://topicbox.com

Reply via email to