git: ac1daaa6f8ab - stable/13 - Adjust agp_find_device() definition in agp.c to avoid clang 15 warning
- Go to: [ bottom of page ] [ top of archives ] [ this month ]
Date: Tue, 19 Jul 2022 18:02:29 UTC
The branch stable/13 has been updated by dim:
URL: https://cgit.FreeBSD.org/src/commit/?id=ac1daaa6f8ab48d2a18e91ccdbadb4c4114500e2
commit ac1daaa6f8ab48d2a18e91ccdbadb4c4114500e2
Author: Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-07-16 14:46:21 +0000
Commit: Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-07-19 18:02:06 +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
(cherry picked from commit c0817e2aba26ceb683e9c649c22d7fcd9a921231)
---
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 aaae2176f85a..84e8274ee49d 100644
--- a/sys/dev/agp/agp.c
+++ b/sys/dev/agp/agp.c
@@ -884,7 +884,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;