This is an automated email from the ASF dual-hosted git repository.

acassis pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git

commit 394de1831651bb8b6e3a17f5847c85b968d29132
Author: raiden00pl <[email protected]>
AuthorDate: Fri May 31 16:01:44 2024 +0200

    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 */

Reply via email to