libfsimage: fix clang 10 build
authorRoger Pau Monne <roger.pau@citrix.com>
Fri, 13 Mar 2020 08:45:57 +0000 (09:45 +0100)
committerWei Liu <wl@xen.org>
Fri, 13 Mar 2020 10:20:21 +0000 (10:20 +0000)
commite54c433adf01a242bf6e9fe9378a2c83d3f8b419
treecf738c44ce3532efb634ccf86afc84d2f6903aa4
parent98108eaee84c64511d3b58f9c58bfe96786ec58c
libfsimage: fix clang 10 build

clang complains with:

fsys_zfs.c:826:2: error: converting the enum constant to a boolean [-Werror,-Wint-in-bool-context]
        VERIFY_DN_TYPE(dn, DMU_OT_PLAIN_FILE_CONTENTS);
        ^
/wrkdirs/usr/ports/sysutils/xen-tools/work/xen-4.13.0/tools/libfsimage/zfs/../../../tools/libfsimage/zfs/fsys_zfs.h:74:11: note: expanded from macro 'VERIFY_DN_TYPE'
        if (type && (dnp)->dn_type != type) { \
                 ^
1 error generated.

Fix this by not forcing an implicit conversion of the enum into a
boolean and instead comparing with the 0 enumerator.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Acked-by: Wei Liu <wl@xen.org>
tools/libfsimage/zfs/fsys_zfs.h