git: db6b32867d6e - main - Adjust function definition in tcp_hpts.c to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Mon, 15 Aug 2022 18:49:20 UTC
The branch main has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=db6b32867d6ed996f8a9aad41ca6ffbaa2088e59 commit db6b32867d6ed996f8a9aad41ca6ffbaa2088e59 Author: Dimitry Andric <dim@FreeBSD.org> AuthorDate: 2022-08-15 18:05:34 +0000 Commit: Dimitry Andric <dim@FreeBSD.org> CommitDate: 2022-08-15 18:48:33 +0000 Adjust function definition in tcp_hpts.c to avoid clang 15 warning With clang 15, the following -Werror warning is produced: sys/netinet/tcp_hpts.c:1594:23: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] tcp_choose_hpts_to_run() ^ void This is because tcp_choose_hpts_to_run() is declared with a (void) argument list, but defined with an empty argument list. Make the definition match the declaration. MFC after: 3 days --- sys/netinet/tcp_hpts.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/netinet/tcp_hpts.c b/sys/netinet/tcp_hpts.c index 0f2d01940922..4df5a236dcce 100644 --- a/sys/netinet/tcp_hpts.c +++ b/sys/netinet/tcp_hpts.c @@ -1591,7 +1591,7 @@ out_with_mtx: } static struct tcp_hpts_entry * -tcp_choose_hpts_to_run() +tcp_choose_hpts_to_run(void) { int i, oldest_idx, start, end; uint32_t cts, time_since_ran, calc;