Date: Sun, 7 May 2006 23:14:25 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 96807 for review Message-ID: <200605072314.k47NEPCi084373@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=96807 Change 96807 by jb@jb_freebsd2 on 2006/05/07 23:14:15 Fix assignments where gcc dislikes NULL being used instead of zero. Affected files ... .. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_dif.c#5 edit Differences ... ==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_dif.c#5 (text+ko) ==== @@ -1154,8 +1154,6 @@ } case DIF_SUBR_STRJOIN: { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD char *d = (char *)mstate->dtms_scratch_ptr; uint64_t size = state->dts_options[DTRACEOPT_STRSIZE]; uintptr_t s1 = tupregs[0].dttk_value; @@ -1165,14 +1163,14 @@ if (mstate->dtms_scratch_ptr + size > mstate->dtms_scratch_base + mstate->dtms_scratch_size) { DTRACE_CPUFLAG_SET(CPU_DTRACE_NOSCRATCH); - regs[rd] = NULL; + regs[rd] = 0; break; } for (;;) { if (i >= size) { DTRACE_CPUFLAG_SET(CPU_DTRACE_NOSCRATCH); - regs[rd] = NULL; + regs[rd] = 0; break; } @@ -1185,7 +1183,7 @@ for (;;) { if (i >= size) { DTRACE_CPUFLAG_SET(CPU_DTRACE_NOSCRATCH); - regs[rd] = NULL; + regs[rd] = 0; break; } @@ -1198,7 +1196,6 @@ regs[rd] = (uintptr_t)d; } -#endif break; } @@ -1363,8 +1360,6 @@ } case DIF_SUBR_CLEANPATH: { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD char *dest = (char *)mstate->dtms_scratch_ptr, c; uint64_t size = state->dts_options[DTRACEOPT_STRSIZE]; uintptr_t src = tupregs[0].dttk_value; @@ -1373,7 +1368,7 @@ if (mstate->dtms_scratch_ptr + size > mstate->dtms_scratch_base + mstate->dtms_scratch_size) { DTRACE_CPUFLAG_SET(CPU_DTRACE_NOSCRATCH); - regs[rd] = NULL; + regs[rd] = 0; break; } @@ -1465,7 +1460,6 @@ dest[j] = '\0'; regs[rd] = (uintptr_t)dest; mstate->dtms_scratch_ptr += size; -#endif break; } } @@ -1487,9 +1481,7 @@ uint64_t rval = 0; dtrace_statvar_t *svar; -#ifdef DOODAD dtrace_dstate_t *dstate = &vstate->dtvs_dynvars; -#endif dtrace_difv_t *v; volatile uint16_t *flags = &cpu_core[CPU->cpu_id].cpuc_dtrace_flags; volatile uintptr_t *illval = &cpu_core[CPU->cpu_id].cpuc_dtrace_illval; @@ -1923,9 +1915,6 @@ break; case DIF_OP_LDTS: { -printf("%s(%d):\n",__FUNCTION__,__LINE__); -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD dtrace_dynvar_t *dvar; dtrace_key_t *key; @@ -1953,14 +1942,11 @@ } else { regs[rd] = *((uint64_t *)dvar->dtdv_data); } -#endif break; } case DIF_OP_STTS: { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD dtrace_dynvar_t *dvar; dtrace_key_t *key; @@ -1985,7 +1971,7 @@ * Given that we're storing to thread-local data, * we need to flush our predicate cache. */ - curthread->t_predcache = NULL; + curthread->t_predcache = 0; if (dvar == NULL) break; @@ -1996,7 +1982,6 @@ } else { *((uint64_t *)dvar->dtdv_data) = regs[rd]; } -#endif break; } @@ -2057,8 +2042,6 @@ case DIF_OP_LDGAA: case DIF_OP_LDTAA: { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD dtrace_dynvar_t *dvar; dtrace_key_t *key = tupregs; uint_t nkeys = ttop; @@ -2094,14 +2077,11 @@ regs[rd] = *((uint64_t *)dvar->dtdv_data); } -#endif break; } case DIF_OP_STGAA: case DIF_OP_STTAA: { -printf("%s:%s(%d): DOODAD\n",__FUNCTION__,__FILE__,__LINE__); -#ifdef DOODAD dtrace_dynvar_t *dvar; dtrace_key_t *key = tupregs; uint_t nkeys = ttop; @@ -2136,7 +2116,6 @@ } else { *((uint64_t *)dvar->dtdv_data) = regs[rd]; } -#endif break; }
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200605072314.k47NEPCi084373>