aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRyan Libby <rlibby@FreeBSD.org>2021-03-14 23:04:27 +0000
committerRyan Libby <rlibby@FreeBSD.org>2021-03-14 23:04:27 +0000
commit588ce1a3ac8d61c99c7827dc71191c46c2d927b7 (patch)
treeaf784fa10a25690ac9fc561fe48f9baf1405d8f0
parent5224c2a3bc95b431f729f3692f264395248d8acc (diff)
downloadsrc-588ce1a3ac8d61c99c7827dc71191c46c2d927b7.tar.gz
src-588ce1a3ac8d61c99c7827dc71191c46c2d927b7.zip
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
-rw-r--r--sys/sys/kobj.h2
1 files changed, 1 insertions, 1 deletions
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;