Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Aug 2022 18:49:23 GMT
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 7a98c884f20f - main - Adjust function definitions in mmu_oea64.c to avoid clang 15 warnings
Message-ID:  <202208151849.27FInNV8027781@gitrepo.freebsd.org>

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

URL: https://cgit.FreeBSD.org/src/commit/?id=7a98c884f20f7835763d09f2edaccc874d5ee698

commit 7a98c884f20f7835763d09f2edaccc874d5ee698
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2022-08-15 18:33:25 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2022-08-15 18:48:34 +0000

    Adjust function definitions in mmu_oea64.c to avoid clang 15 warnings
    
    With clang 15, the following -Werror warnings are produced:
    
        sys/powerpc/aim/mmu_oea64.c:1947:12: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        moea64_init()
                   ^
                    void
        sys/powerpc/aim/mmu_oea64.c:3257:17: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes]
        moea64_scan_init()
                        ^
                         void
    
    This is because moea64_init() and moea64_scan_init() are declared with
    (void) argument lists, but defined with empty argument lists. Make the
    definitions match the declarations.
    
    MFC after:      3 days
---
 sys/powerpc/aim/mmu_oea64.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/sys/powerpc/aim/mmu_oea64.c b/sys/powerpc/aim/mmu_oea64.c
index ba8e8bf23fb4..9eef508ef585 100644
--- a/sys/powerpc/aim/mmu_oea64.c
+++ b/sys/powerpc/aim/mmu_oea64.c
@@ -1944,7 +1944,7 @@ moea64_uma_page_alloc(uma_zone_t zone, vm_size_t bytes, int domain,
 extern int elf32_nxstack;
 
 void
-moea64_init()
+moea64_init(void)
 {
 
 	CTR0(KTR_PMAP, "moea64_init");
@@ -3254,7 +3254,7 @@ moea64_dumpsys_map(vm_paddr_t pa, size_t sz, void **va)
 extern struct dump_pa dump_map[PHYS_AVAIL_SZ + 1];
 
 void
-moea64_scan_init()
+moea64_scan_init(void)
 {
 	struct pvo_entry *pvo;
 	vm_offset_t va;



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