Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 19 Jul 2022 18:03:00 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Subject:   git: 381951ce6dc8 - stable/12 - Adjust agp_find_device() definition in agp.c to avoid clang 15 warning
Message-ID:  <202207191803.26JI30hA077965@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch stable/12 has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=381951ce6dc8ab3b13f39757ecbce41b1fea5e53

commit 381951ce6dc8ab3b13f39757ecbce41b1fea5e53
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:00 +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 011c89afeb37..ca24662d4a0d 100644
--- a/sys/dev/agp/agp.c
+++ b/sys/dev/agp/agp.c
@@ -890,7 +890,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;



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202207191803.26JI30hA077965>