Module Name:    src
Committed By:   christos
Date:           Wed Oct 16 15:08:09 UTC 2019

Modified Files:
        src/sys/sys: sdt.h

Log Message:
void * cast the probe functions that take more than 5 uintptr_t arguments
(dtrace_probe takes 5).


To generate a diff of this commit:
cvs rdiff -u -r1.10 -r1.11 src/sys/sys/sdt.h

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/sys/sdt.h
diff -u src/sys/sys/sdt.h:1.10 src/sys/sys/sdt.h:1.11
--- src/sys/sys/sdt.h:1.10	Sun Aug 26 12:54:38 2018
+++ src/sys/sys/sdt.h	Wed Oct 16 11:08:09 2019
@@ -1,4 +1,4 @@
-/*	$NetBSD: sdt.h,v 1.10 2018/08/26 16:54:38 riastradh Exp $	*/
+/*	$NetBSD: sdt.h,v 1.11 2019/10/16 15:08:09 christos Exp $	*/
 
 /*-
  * Copyright 2006-2008 John Birrell <j...@freebsd.org>
@@ -309,11 +309,13 @@
 	SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, 0)
 #define	SDT_PROBE5(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4) \
 	SDT_PROBE(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4)
+/* XXX: void * function casts */
 #define	SDT_PROBE6(prov, mod, func, name, arg0, arg1, arg2, arg3, arg4, arg5)  \
 	do {								       \
 		if (sdt_##prov##_##mod##_##func##_##name->id)		       \
 			(*(void (*)(uint32_t, uintptr_t, uintptr_t, uintptr_t, \
-			    uintptr_t, uintptr_t, uintptr_t))sdt_probe_func)(  \
+			    uintptr_t, uintptr_t, uintptr_t))(void *)	       \
+			    sdt_probe_func)(  				       \
 			    sdt_##prov##_##mod##_##func##_##name->id,	       \
 			    (uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, \
 			    (uintptr_t)arg3, (uintptr_t)arg4, (uintptr_t)arg5);\
@@ -324,7 +326,7 @@
 		if (sdt_##prov##_##mod##_##func##_##name->id)		       \
 			(*(void (*)(uint32_t, uintptr_t, uintptr_t, uintptr_t, \
 			    uintptr_t, uintptr_t, uintptr_t, uintptr_t))       \
-			    sdt_probe_func)(				       \
+			    (void *)sdt_probe_func)(			       \
 			    sdt_##prov##_##mod##_##func##_##name->id,	       \
 			    (uintptr_t)arg0, (uintptr_t)arg1, (uintptr_t)arg2, \
 			    (uintptr_t)arg3, (uintptr_t)arg4, (uintptr_t)arg5, \

Reply via email to