summaryrefslogtreecommitdiffstats
path: root/include/cache.h
diff options
context:
space:
mode:
authorFlorian Westphal <fw@strlen.de>2023-04-29 15:48:09 +0200
committerFlorian Westphal <fw@strlen.de>2023-04-29 15:48:09 +0200
commit0d614a853bf49acf06f47aed2bbeb8a704959165 (patch)
tree15bca0b710f4f18b874f4a526dbe5d9f3b690e15 /include/cache.h
parent2aa0b0a3696ea78282f6b6eeb7748923ab3a1109 (diff)
src: fix enum/integer mismatches
gcc 13 complains about type confusion: cache.c:1178:5: warning: conflicting types for 'nft_cache_update' due to enum/integer mismatch; have 'int(struct nft_ctx *, unsigned int, struct list_head *, const struct nft_cache_filter *)' [-Wenum-int-mismatch] cache.h:74:5: note: previous declaration of 'nft_cache_update' with type 'int(struct nft_ctx *, enum cmd_ops, struct list_head *, const struct nft_cache_filter *)' Same for: rule.c:1915:13: warning: conflicting types for 'obj_type_name' due to enum/integer mismatch; have 'const char *(enum stmt_types)' [-Wenum-int-mismatch] 1915 | const char *obj_type_name(enum stmt_types type) | ^~~~~~~~~~~~~ expression.c:1543:24: warning: conflicting types for 'expr_ops_by_type' due to enum/integer mismatch; have 'const struct expr_ops *(uint32_t)' {aka 'const struct expr_ops *(unsigned int)'} [-Wenum-int-mismatch] 1543 | const struct expr_ops *expr_ops_by_type(uint32_t value) | ^~~~~~~~~~~~~~~~ Convert to the stricter type (enum) where possible. Signed-off-by: Florian Westphal <fw@strlen.de>
Diffstat (limited to 'include/cache.h')
-rw-r--r--include/cache.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/cache.h b/include/cache.h
index 5bf78fe0..934c3a74 100644
--- a/include/cache.h
+++ b/include/cache.h
@@ -71,7 +71,7 @@ enum cmd_ops;
int nft_cache_evaluate(struct nft_ctx *nft, struct list_head *cmds,
struct list_head *msgs, struct nft_cache_filter *filter,
unsigned int *flags);
-int nft_cache_update(struct nft_ctx *ctx, enum cmd_ops cmd,
+int nft_cache_update(struct nft_ctx *ctx, unsigned int flags,
struct list_head *msgs,
const struct nft_cache_filter *filter);
bool nft_cache_needs_update(struct nft_cache *cache);