Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 07 Aug 2026 21:32:56 +0000
From:      Enji Cooper <ngie@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org
Cc:        Zhang Qiyue <peter-open-source.probing805@aleeas.com>
Subject:   git: 3d064b7b158a - stable/14 - libc: tests: add static to resolve -Wmissing-prototypes
Message-ID:  <6a764f08.2375f.1c9f2503@gitrepo.freebsd.org>

index | next in thread | raw e-mail

The branch stable/14 has been updated by ngie:

URL: https://cgit.FreeBSD.org/src/commit/?id=3d064b7b158a0ecedb6021dcd1f9b6a9e43f0a2d

commit 3d064b7b158a0ecedb6021dcd1f9b6a9e43f0a2d
Author:     Zhang Qiyue <peter-open-source.probing805@aleeas.com>
AuthorDate: 2026-07-12 06:26:36 +0000
Commit:     Enji Cooper <ngie@FreeBSD.org>
CommitDate: 2026-08-07 21:32:40 +0000

    libc: tests: add static to resolve -Wmissing-prototypes
    
    The function create_staticobj() is only used inside this translation unit.
    Clang produces a -Wmissing-prototypes warning during standard buildworld.
    This warning will become a fatal compile error if MK_WERROR is enabled for hardened builds.
    
    PR: 285870
    Fixes: ee9ce1078 ("libc: tests: add some tests for __cxa_atexit...")
    Signed-off-by: Zhang Qiyue <peter-open-source.probing805@aleeas.com>
    Reviewed-by: ngie
    Pull-Request: https://github.com/freebsd/freebsd-src/pull/2321
    (cherry picked from commit 64038db825d64fb4827fc8ee264ea0fa1a046d82)
---
 lib/libc/tests/stdlib/libatexit/libatexit.cc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/libc/tests/stdlib/libatexit/libatexit.cc b/lib/libc/tests/stdlib/libatexit/libatexit.cc
index bb286c97e421..7c5a7126d178 100644
--- a/lib/libc/tests/stdlib/libatexit/libatexit.cc
+++ b/lib/libc/tests/stdlib/libatexit/libatexit.cc
@@ -44,7 +44,7 @@ struct other_object {
 	}
 };
 
-void
+static void
 create_staticobj()
 {
 	static other_object obj;


home | help

Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6a764f08.2375f.1c9f2503>