From: Thomas Haller Date: Tue, 29 Aug 2023 12:53:30 +0000 (+0200) Subject: netlink: avoid "-Wenum-conversion" warning in dtype_map_from_kernel() X-Git-Tag: v1.0.9~170 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=bb1be65591fdbf2c57fcaf68d64ce56b34c847ad;p=thirdparty%2Fnftables.git netlink: avoid "-Wenum-conversion" warning in dtype_map_from_kernel() Clang warns: netlink.c:806:26: error: implicit conversion from enumeration type 'enum nft_data_types' to different enumeration type 'enum datatypes' [-Werror,-Wenum-conversion] return datatype_lookup(type); ~~~~~~~~~~~~~~~ ^~~~ Signed-off-by: Thomas Haller Signed-off-by: Pablo Neira Ayuso --- diff --git a/src/netlink.c b/src/netlink.c index e1904a99..1afe162e 100644 --- a/src/netlink.c +++ b/src/netlink.c @@ -803,7 +803,7 @@ static const struct datatype *dtype_map_from_kernel(enum nft_data_types type) default: if (type & ~TYPE_MASK) return concat_type_alloc(type); - return datatype_lookup(type); + return datatype_lookup((enum datatypes) type); } }