Re: [PATCH 2/2] selftests/netfilter: return a value for several "int" functions

2024-05-07 Thread John Hubbard
On 5/7/24 1:36 AM, Felix Huettner wrote: > > As long as we are looking at this, what do you think about > this: > > diff --git a/tools/testing/selftests/netfilter/conntrack_dump_flush.c > b/tools/testing/selftests/netfilter/conntrack_dump_flush.c > index e9df4ae14e16..4a73afad4de4 100644

Re: [PATCH 2/2] selftests/netfilter: return a value for several "int" functions

2024-05-06 Thread John Hubbard
On 5/6/24 7:41 AM, Felix Huettner wrote: On Sun, May 05, 2024 at 02:47:16PM -0700, John Hubbard wrote: ... > @@ -207,6 +210,7 @@ static int conntrack_data_generate_v6(struct mnl_socket *sock, >  static int count_entries(const struct nlmsghdr *nlh, void *data) >  { >        

[PATCH 2/2] selftests/netfilter: return a value for several "int" functions

2024-05-05 Thread John Hubbard
When building with clang, via: make LLVM=1 -C tools/testing/selftests ...clang warns, correctly, that several functions declared with an "int" return type are not always returning values in all cases (or at least, clang cannot prove that they always return a value). Fix this by returning 0