PERFORCE change 103957 for review

John Birrell jb at FreeBSD.org
Tue Aug 15 02:40:04 UTC 2006


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

Change 103957 by jb at jb_freebsd2 on 2006/08/15 02:39:22

	Fix yet more compiler warnings.

Affected files ...

.. //depot/projects/dtrace/src/sys/contrib/opensolaris/common/ctf/ctf_lookup.c#3 edit

Differences ...

==== //depot/projects/dtrace/src/sys/contrib/opensolaris/common/ctf/ctf_lookup.c#3 (text) ====

@@ -27,7 +27,7 @@
 
 #pragma ident	"@(#)ctf_lookup.c	1.6	06/01/07 SMI"
 
-#if	defined(sun)
+#if defined(sun)
 #include <sys/sysmacros.h>
 #endif
 #include <ctf_impl.h>
@@ -63,7 +63,7 @@
 	int h = s[len - 1] + (int)len - 105;
 	const struct qual *qp = &qhash[h];
 
-	return (h >= 0 && h < sizeof (qhash) / sizeof (qhash[0]) &&
+	return (h >= 0 && h < (int) (sizeof (qhash) / sizeof (qhash[0])) &&
 	    len == qp->q_len && strncmp(qp->q_name, s, qp->q_len) == 0);
 }
 
@@ -214,7 +214,7 @@
  * given type ID.  If the ID is invalid, the function returns NULL.
  * This function is not exported outside of the library.
  */
-const ctf_type_t *
+ctf_type_t *
 ctf_lookup_by_id(ctf_file_t **fpp, ctf_id_t type)
 {
 	ctf_file_t *fp = *fpp; /* caller passes in starting CTF container */
@@ -226,7 +226,7 @@
 	}
 
 	type = CTF_TYPE_TO_INDEX(type);
-	if (type > 0 && type <= fp->ctf_typemax) {
+	if (type > 0 && type <= (long) fp->ctf_typemax) {
 		*fpp = fp; /* function returns ending CTF container */
 		return (LCTF_INDEX_TO_TYPEPTR(fp, type));
 	}


More information about the p4-projects mailing list