From 394de1831651bb8b6e3a17f5847c85b968d29132 Mon Sep 17 00:00:00 2001 From: raiden00pl Date: Fri, 31 May 2024 16:01:44 +0200 Subject: [PATCH] netfilter/ip_tables.h: fix gcc14 error /home/raiden00/git/RTOS/nuttx/nuttx/include/nuttx/net/netfilter/ip_tables.h:281:24: error: returning 'char *' from a function with incompatible return type 'struct xt_entry_target *' [-Wincompatible-pointer-types] 281 | return (FAR char *)e + e->target_offset; | ~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~ --- include/nuttx/net/netfilter/ip_tables.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/nuttx/net/netfilter/ip_tables.h b/include/nuttx/net/netfilter/ip_tables.h index a8dbac3208..4913df7d65 100644 --- a/include/nuttx/net/netfilter/ip_tables.h +++ b/include/nuttx/net/netfilter/ip_tables.h @@ -278,7 +278,7 @@ struct ipt_get_entries static inline FAR struct xt_entry_target * ipt_get_target(FAR struct ipt_entry *e) { - return (FAR char *)e + e->target_offset; + return (FAR struct xt_entry_target *)((FAR char *)e + e->target_offset); } #endif /* __INCLUDE_NUTTX_NET_NETFILTER_IP_TABLES_H */