Date: Wed, 3 May 2006 22:41:59 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 96628 for review Message-ID: <200605032241.k43Mfxdj009466@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=96628 Change 96628 by jb@jb_freebsd2 on 2006/05/03 22:41:39 More 'const' grief. It only takes one attempt to cast a char pointer to drop the 'const' to ruin an entire 'const' day. Declaring things 'const' is only worthwhile if you're going to obey them. In FreeBSD, the default kernel module compiler options detect the inconsistency in Sun's code. Sigh. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#19 edit .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_register.c#5 edit .. //depot/projects/dtrace/src/sys/cddl/dev/systrace/systrace.c#4 edit .. //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#14 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace.c#19 (text+ko) ==== @@ -246,7 +246,7 @@ static dtrace_pops_t dtrace_provider_ops = { /* dtps_provide */ - (void (*)(void *, const dtrace_probedesc_t *))dtrace_nullop, + (void (*)(void *, dtrace_probedesc_t *))dtrace_nullop, /* dtps_provide_module */ (void (*)(void *, modctl_t *))dtrace_nullop, /* dtps_enable */ ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_register.c#5 (text+ko) ==== @@ -78,7 +78,7 @@ if (pops->dtps_provide == NULL) { ASSERT(pops->dtps_provide_module != NULL); provider->dtpv_pops.dtps_provide = - (void (*)(void *, const dtrace_probedesc_t *))dtrace_nullop; + (void (*)(void *, dtrace_probedesc_t *))dtrace_nullop; } if (pops->dtps_provide_module == NULL) { ==== //depot/projects/dtrace/src/sys/cddl/dev/systrace/systrace.c#4 (text+ko) ==== @@ -78,7 +78,7 @@ static int systrace_unload(void); static void systrace_args(int, void *, u_int64_t *, int *); static void systrace_probe(u_int32_t, int, struct sysent *, void *); -static void systrace_provide(void *, const dtrace_probedesc_t *); +static void systrace_provide(void *, dtrace_probedesc_t *); static void systrace_destroy(void *, dtrace_id_t, void *); static void systrace_enable(void *, dtrace_id_t, void *); static void systrace_disable(void *, dtrace_id_t, void *); @@ -166,7 +166,7 @@ /*ARGSUSED*/ static void -systrace_provide(void *arg, const dtrace_probedesc_t *desc) +systrace_provide(void *arg, dtrace_probedesc_t *desc) { int i; ==== //depot/projects/dtrace/src/sys/contrib/opensolaris/uts/common/sys/dtrace.h#14 (text) ==== @@ -1995,7 +1995,7 @@ * routines. */ typedef struct dtrace_pops { - void (*dtps_provide)(void *arg, const dtrace_probedesc_t *spec); + void (*dtps_provide)(void *arg, dtrace_probedesc_t *spec); void (*dtps_provide_module)(void *arg, modctl_t *mp); void (*dtps_enable)(void *arg, dtrace_id_t id, void *parg); void (*dtps_disable)(void *arg, dtrace_id_t id, void *parg);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605032241.k43Mfxdj009466>