From nobody Wed Jul 03 16:15:00 2024 X-Original-To: dev-commits-src-main@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 4WDlH92mXRz5PfFv; Wed, 03 Jul 2024 16:15:01 +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 "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4WDlH90B8jz4BGw; Wed, 3 Jul 2024 16:15:01 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720023301; 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=/Et3DHQjws9uPG1HuU0NqolB0kL3oNdhxJw6LGXR+co=; b=oJK1SD6hFUMB3XUs70WsNGhVr8YXLT/Z6yqMN5u96bdqvDJKog6KSDDSi4b0aAdTImgoI4 Z7BEWLR4fq9vLjW2fL12rLDh6lrXkZN7EePeoLY4NW6h9gczi69U97zPCrXqZ6ozQHBg/5 2N8Z97AB5IgZZSLXCoDLgXlukSAJ/Tir7Pqr/uVw6bdZJ0Xo5AKwiGzM3+fCfQCDnhY87D JhoGYtLFqM80iCzl70fwW3kr+gqjuxvJojsgN69SoBEfIZZbM7RJd464EYXDpuICFmEwMX PmTT04oBj7sAIEcBMs46cC3NNYpdNTBrLAyD7+Vhva/PEVe8lCFN+l9I55Dvsg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1720023301; a=rsa-sha256; cv=none; b=KCcnxV4m71XOXQt5Jmjz2oKDw+d/VNMSMF+CuQzDc1z7aQ9tCRdqQgBxDVPRa5Y1CDHwC+ WdRe2VNelGBLbZgGKFhtX4fF+bKPCNyC7MNKtiDf79Rf5MMB7Z/g/7XurGYrJRXiz6K6G1 IpMP44RRVd0fPGMmf51PurCku9y0g+RK9LLaU19ISHGKqyBlTuAprnHYzKp56AmAt+giUv WTefB1SkcDH3g+gl6Oa2wLoFiikqcLH5qi+lOS7BZjKddOpm8ErQ3BQRuTdcGtq0WqAG1r taRQjotzOdJtbw3+aLqwRr7KupJ2IerndyxpYQZMjTrg6KXYnCxHBiCwGfqH4g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1720023301; 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=/Et3DHQjws9uPG1HuU0NqolB0kL3oNdhxJw6LGXR+co=; b=yyjFkMZIlomvu2uXETWxdWnRzTN78t8Ewieh/oVYWOhhJWo/Ahi/jRrfTmG0gHOlrSZefj dRcFA2kpQpIjVrs/qncnx+8OcrTOmRcJJPyOcfF3oD6ctgcRhmr1uEiPQXmEI6g88B81d4 ADPBONxp2YD7YSUCRdc53XtcMjEn6rXdGXS398y0x0fkZ5GkXIyVRAul3JnTVv424WTGI/ aDUCF+yixX1Yvow9XNlu2DDl3uqLnlj/lBA2a2oyvNejDbsQ4ZEpOpUee6zUynmPQj+Foa IJotWYQ5tmbuDdreQgVGpvvuyxMv4nn9Fy7dxhZyV7dJH45PBFkPCL+YUHbYQg== 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 4WDlH86rpKzdvq; Wed, 3 Jul 2024 16:15:00 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.18.1/8.18.1) with ESMTP id 463GF0qN041724; Wed, 3 Jul 2024 16:15:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.18.1/8.18.1/Submit) id 463GF0hW041721; Wed, 3 Jul 2024 16:15:00 GMT (envelope-from git) Date: Wed, 3 Jul 2024 16:15:00 GMT Message-Id: <202407031615.463GF0hW041721@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Ryan Libby Subject: git: 07d359787f0d - main - libthr: avoid gcc -Wcast-function-type List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: X-BeenThere: dev-commits-src-main@freebsd.org Sender: owner-dev-commits-src-main@FreeBSD.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: rlibby X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 07d359787f0d7f8e5682a3d1991ef68711fb94d1 Auto-Submitted: auto-generated The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=07d359787f0d7f8e5682a3d1991ef68711fb94d1 commit 07d359787f0d7f8e5682a3d1991ef68711fb94d1 Author: Ryan Libby AuthorDate: 2024-07-03 15:38:32 +0000 Commit: Ryan Libby CommitDate: 2024-07-03 15:38:32 +0000 libthr: avoid gcc -Wcast-function-type The actual types of pthread_func_t and interpos_func_t are not used. Declare them as the generic void (*)(void) which suppresses warnings. https://gcc.gnu.org/onlinedocs/gcc/Warning-Options.html#index-Wcast-function-type Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D45830 --- lib/libc/include/libc_private.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/libc/include/libc_private.h b/lib/libc/include/libc_private.h index 2b16ce736e3a..4d4779647f50 100644 --- a/lib/libc/include/libc_private.h +++ b/lib/libc/include/libc_private.h @@ -190,7 +190,7 @@ typedef enum { PJT_MAX } pjt_index_t; -typedef int (*pthread_func_t)(void); +typedef void (*pthread_func_t)(void); typedef pthread_func_t pthread_func_entry_t[2]; extern pthread_func_entry_t __thr_jtable[]; @@ -199,7 +199,7 @@ void __set_error_selector(int *(*arg)(void)); int _pthread_mutex_init_calloc_cb_stub(pthread_mutex_t *mutex, void *(calloc_cb)(__size_t, __size_t)); -typedef int (*interpos_func_t)(void); +typedef void (*interpos_func_t)(void); interpos_func_t *__libc_interposing_slot(int interposno); extern interpos_func_t __libc_interposing[] __hidden; interpos_func_t *__libsys_interposing_slot(int interposno);