git: c0817e2aba26 - main - Adjust agp_find_device() definition in agp.c to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Sat, 16 Jul 2022 14:52:44 UTC
The branch main has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=c0817e2aba26ceb683e9c649c22d7fcd9a921231
commit c0817e2aba26ceb683e9c649c22d7fcd9a921231
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-16 14:46:21 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-16 14:46:21 +0000
Adjust agp_find_device() definition in agp.c to avoid clang 15 warning
With clang 15, the following -Werror warning is produced:
sys/dev/agp/agp.c:910:16: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
agp_find_device()
^
void
This is because agp_find_device() is declared with a (void) argument
list, and defined with an empty argument list. Make the definition match
the declaration.
MFC after: 3 days
---
sys/dev/agp/agp.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/sys/dev/agp/agp.c b/sys/dev/agp/agp.c
index d61ae11f998f..b973b3d7ce3f 100644
--- a/sys/dev/agp/agp.c
+++ b/sys/dev/agp/agp.c
@@ -907,7 +907,7 @@ agp_mmap(struct cdev *kdev, vm_ooffset_t offset, vm_paddr_t *paddr,
/* Implementation of the kernel api */
device_t
-agp_find_device()
+agp_find_device(void)
{
device_t *children, child;
int i, count;