PERFORCE change 103945 for review

John Birrell jb at FreeBSD.org
Tue Aug 15 02:20:33 UTC 2006


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

Change 103945 by jb at jb_freebsd2 on 2006/08/15 02:19:57

	Fix compiler warnings.

Affected files ...

.. //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c#9 edit

Differences ...

==== //depot/projects/dtrace/src/contrib/opensolaris/lib/libdtrace/common/dt_aggregate.c#9 (text) ====

@@ -58,7 +58,7 @@
 static void
 dt_aggregate_count(int64_t *existing, int64_t *new, size_t size)
 {
-	int i;
+	uint_t i;
 
 	for (i = 0; i < size / sizeof (int64_t); i++)
 		existing[i] = existing[i] + new[i];
@@ -196,9 +196,10 @@
 static int
 dt_aggregate_quantizedcmp(int64_t *lhs, int64_t *rhs)
 {
-	int nbuckets = DTRACE_QUANTIZE_NBUCKETS, i;
+	int nbuckets = DTRACE_QUANTIZE_NBUCKETS;
 	long double ltotal = 0, rtotal = 0;
 	int64_t lzero, rzero;
+	uint_t i;
 
 	for (i = 0; i < nbuckets; i++) {
 		int64_t bucketval = DTRACE_QUANTIZE_BUCKETVAL(i);
@@ -634,7 +635,7 @@
 		return (0);
 
 	for (i = 0; i < agp->dtat_ncpus; i++) {
-		if (rval = dt_aggregate_snap_cpu(dtp, agp->dtat_cpus[i]))
+		if ((rval = dt_aggregate_snap_cpu(dtp, agp->dtat_cpus[i])))
 			return (rval);
 	}
 
@@ -1088,7 +1089,7 @@
 
 	case DTRACE_AGGWALK_REMOVE: {
 		dtrace_aggdata_t *aggdata = &h->dtahe_data;
-		int i, max_cpus = agp->dtat_maxcpu;
+		int max_cpus = agp->dtat_maxcpu;
 
 		/*
 		 * First, remove this hash entry from its hash chain.


More information about the p4-projects mailing list