PERFORCE change 95911 for review

John Birrell jb at FreeBSD.org
Sat Apr 22 23:54:00 UTC 2006


http://perforce.freebsd.org/chv.cgi?CH=95911

Change 95911 by jb at jb_freebsd2 on 2006/04/22 23:53:18

	Silence a few gcc unitialised variable warnings.

Affected files ...

.. //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_speculation.c#2 edit

Differences ...

==== //depot/projects/dtrace/src/sys/cddl/dev/dtrace/dtrace_speculation.c#2 (text+ko) ====

@@ -56,7 +56,7 @@
 	dtrace_speculation_t *spec;
 	dtrace_buffer_t *src, *dest;
 	uintptr_t daddr, saddr, dlimit;
-	dtrace_speculation_state_t current, new;
+	dtrace_speculation_state_t current, new = 0;
 	intptr_t offs;
 
 	if (which == 0)
@@ -170,8 +170,10 @@
 	 */
 	if (current == DTRACESPEC_ACTIVE ||
 	    (current == DTRACESPEC_ACTIVEONE && new == DTRACESPEC_COMMITTING)) {
+#ifdef DEBUG
 		uint32_t rval = dtrace_cas32((uint32_t *)&spec->dtsp_state,
 		    DTRACESPEC_COMMITTING, DTRACESPEC_INACTIVE);
+#endif
 
 		ASSERT(rval == DTRACESPEC_COMMITTING);
 	}
@@ -192,7 +194,7 @@
     dtrace_specid_t which)
 {
 	dtrace_speculation_t *spec;
-	dtrace_speculation_state_t current, new;
+	dtrace_speculation_state_t current, new = 0;
 	dtrace_buffer_t *buf;
 
 	if (which == 0)
@@ -354,7 +356,7 @@
     dtrace_specid_t which)
 {
 	dtrace_speculation_t *spec;
-	dtrace_speculation_state_t current, new;
+	dtrace_speculation_state_t current, new = 0;
 	dtrace_buffer_t *buf;
 
 	if (which == 0)


More information about the p4-projects mailing list