From nobody Fri Jul 29 18:48:25 2022 X-Original-To: dev-commits-src-all@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4Lvc3Y467Lz4Y1mw; Fri, 29 Jul 2022 18:48:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4Lvc3Y30Ytz3sL9; Fri, 29 Jul 2022 18:48:25 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659120505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fz756sCFx04qp0ZThyLHt/Bg2X3aw4EWOlT3dqxWcWk=; b=TJFWPd59VpmhCl2NpdL5mmBKSd567nWFHBdh6/vDB8t+b3P4lBgEwMuFLLZE+eaJ/1gUX1 IjgBgH7eWtmU1rRf7SL2r8ZC8b+yIXTYq89b2QNX+Z9l4Nbbr9ckIuBtzq4q38W5FNgWPZ agAY2RFh/GRl3n26vzamdfKXNf+0/BSlyo3yqDrGQJsIMWtxLAZA2iJyWRphPfNJgrx9VU /yBWf2eZsyYdeQ84YbD2xlhTCuXkkp7AGC5LMMUXiB7VWiHT52MkOpxuoliQ3wSUeBgZt2 HGVL2tqsiNpOwm6HXupACc5Qv4P0IzeWiGce255TPthU4ZPVRofemKMae/jogQ== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4Lvc3Y25dXzlkJ; Fri, 29 Jul 2022 18:48:25 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 26TImPgo025352; Fri, 29 Jul 2022 18:48:25 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26TImPAI025351; Fri, 29 Jul 2022 18:48:25 GMT (envelope-from git) Date: Fri, 29 Jul 2022 18:48:25 GMT Message-Id: <202207291848.26TImPAI025351@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Dimitry Andric Subject: git: 59453e47c8be - stable/12 - Adjust function definitions in geom_event.c to avoid clang 15 warnings List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: dim X-Git-Repository: src X-Git-Refname: refs/heads/stable/12 X-Git-Reftype: branch X-Git-Commit: 59453e47c8be34c63b81f5405014aebf7879d299 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1659120505; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Fz756sCFx04qp0ZThyLHt/Bg2X3aw4EWOlT3dqxWcWk=; b=BW4NKEfiDkz5x8VkugkYqVYlaUuNvAkpNfopjn4o6+2vsrHgYl2RTgldnVr5N4ZP7et9Ws 4OKGh/sVH00YImVU4k95omOyDO1NDli2Q+oIZDGxQ+1BIB9Rhheh6Q8rTYSDLf7IAcM/lU CEbyrvHd1WTpRQ3bStkz+PevdejSsj2yG96bisLNpVHmw7QxCLRR2ABczEec1Qpc5/XmnX f1NgW7yhtuRx09Dnui5uMhnf+oLmzx5n4H/Z0vHhvMmqI3ciUoX6TZP4KBAjiUVomJCJ2z SK67ZEFBjKlFlHaRxnpJ9snVwcxowsR4ScL0gtAHwHhoDuNmvXq4O2TAeo/bQw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1659120505; a=rsa-sha256; cv=none; b=gxyGjqmFKnimnMXyEwFQDCTMHNAH+ciAMqOlRWWKKhyeUU7nQ8Hs21rF/HP4nWAiaxTE6f UPzuuKXrZ3Oggw9OR4sscqyjNWN6+AUuuanJ/ny87XK1nep8wbO4JnWdtTGl+6zXJpBwy0 56Wtt881L4zF2sEdvsI8b5QFfYTj/H7P+t+WqovDsEtrW03ZBaZw3jOe8BMtYkXo+2hGcY lBCU+0LunAGYWm668Jj8vbS9hLDoJY99E6H23QhMcxH0EofRJSNqDjHKkRLuTLhK5Shj/f Qxnk38kPQP9OFyIrQPz3lKH3p+R1okYQJE0fa7G/kuEklHtzhwj2at4JshZdWw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/12 has been updated by dim: URL: https://cgit.FreeBSD.org/src/commit/?id=59453e47c8be34c63b81f5405014aebf7879d299 commit 59453e47c8be34c63b81f5405014aebf7879d299 Author: Dimitry Andric AuthorDate: 2022-07-26 13:58:31 +0000 Commit: Dimitry Andric CommitDate: 2022-07-29 18:35:37 +0000 Adjust function definitions in geom_event.c to avoid clang 15 warnings With clang 15, the following -Werror warnings are produced: sys/geom/geom_event.c:261:13: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] g_run_events() ^ void sys/geom/geom_event.c:405:12: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] g_do_wither() ^ void sys/geom/geom_event.c:449:13: error: a function declaration without a prototype is deprecated in all versions of C [-Werror,-Wstrict-prototypes] g_event_init() ^ void This is because g_run_events(), g_do_wither(), and g_event_init() are declared with (void) argument lists, but defined with empty argument lists. Make the definitions match the declarations. MFC after: 3 days (cherry picked from commit ac3153434fcc3ddcbb47c7f397a1bc34fd0e0dcb) --- sys/geom/geom_event.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sys/geom/geom_event.c b/sys/geom/geom_event.c index b4b902b3495a..b55a9dbf59c8 100644 --- a/sys/geom/geom_event.c +++ b/sys/geom/geom_event.c @@ -283,7 +283,7 @@ one_event(void) } void -g_run_events() +g_run_events(void) { for (;;) { @@ -396,7 +396,7 @@ g_post_event(g_event_t *func, void *arg, int flag, ...) } void -g_do_wither() +g_do_wither(void) { mtx_lock(&g_eventlock); @@ -440,7 +440,7 @@ g_waitfor_event(g_event_t *func, void *arg, int flag, ...) } void -g_event_init() +g_event_init(void) { mtx_init(&g_eventlock, "GEOM orphanage", NULL, MTX_DEF);