From owner-dev-commits-src-all@freebsd.org Sun Mar 14 23:20:30 2021 Return-Path: Delivered-To: dev-commits-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 100DB5B63F7; Sun, 14 Mar 2021 23:20:30 +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 4DzFs974mCz4tVJ; Sun, 14 Mar 2021 23:20:29 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 E1A7125C78; Sun, 14 Mar 2021 23:20:29 +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 12ENKTgH005639; Sun, 14 Mar 2021 23:20:29 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 12ENKTwE005638; Sun, 14 Mar 2021 23:20:29 GMT (envelope-from git) Date: Sun, 14 Mar 2021 23:20:29 GMT Message-Id: <202103142320.12ENKTwE005638@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: 588ce1a3ac8d - main - kobj: avoid gcc -Wcast-function-type 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: 588ce1a3ac8d61c99c7827dc71191c46c2d927b7 Auto-Submitted: auto-generated X-BeenThere: dev-commits-src-all@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for all branches of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 14 Mar 2021 23:20:30 -0000 The branch main has been updated by rlibby: URL: https://cgit.FreeBSD.org/src/commit/?id=588ce1a3ac8d61c99c7827dc71191c46c2d927b7 commit 588ce1a3ac8d61c99c7827dc71191c46c2d927b7 Author: Ryan Libby AuthorDate: 2021-03-14 23:04:27 +0000 Commit: Ryan Libby CommitDate: 2021-03-14 23:04:27 +0000 kobj: avoid gcc -Wcast-function-type The actual type of kobjop_t is arbitrary, it is only used as a generic function pointer type. Declare it as void (*)(void) in order to avoid gcc's -Wcast-function-type, which is included in -Wextra. Reviewed by: avg, jhb Sponsored by: Dell EMC Isilon Differential Revision: https://reviews.freebsd.org/D28769 --- sys/sys/kobj.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sys/sys/kobj.h b/sys/sys/kobj.h index da8c2d5106bb..aaf92688ca08 100644 --- a/sys/sys/kobj.h +++ b/sys/sys/kobj.h @@ -37,7 +37,7 @@ typedef struct kobj *kobj_t; typedef struct kobj_class *kobj_class_t; typedef const struct kobj_method kobj_method_t; -typedef int (*kobjop_t)(void); +typedef void (*kobjop_t)(void); typedef struct kobj_ops *kobj_ops_t; typedef struct kobjop_desc *kobjop_desc_t; struct malloc_type;