git: ee6c09ac73b5 - main - Adjust irdma_prep_for_unregister() definition to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sun, 24 Jul 2022 22:40:36 UTC
The branch main has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=ee6c09ac73b5eab848c66e539f8b3293a5abd7f8
commit ee6c09ac73b5eab848c66e539f8b3293a5abd7f8
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-24 21:27:24 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-24 22:40:12 +0000
Adjust irdma_prep_for_unregister() definition to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/dev/irdma/icrdma.c:621:26: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
irdma_prep_for_unregister()
^
void
This is because irdma_prep_for_unregister() 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/dev/irdma/icrdma.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/irdma/icrdma.c b/sys/dev/irdma/icrdma.c
index 1bc78dce90aa..c5a42eb863e6 100644
--- a/sys/dev/irdma/icrdma.c
+++ b/sys/dev/irdma/icrdma.c
@@ -618,7 +618,7 @@ irdma_remove(struct ice_rdma_peer *peer)
* irdma_prep_for_unregister - ensure the driver is ready to unregister
*/
static void
-irdma_prep_for_unregister()
+irdma_prep_for_unregister(void)
{
struct irdma_handler *hdl;
unsigned long flags;