Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 15 Aug 2006 02:41:04 GMT
From:      John Birrell <jb@FreeBSD.org>
To:        Perforce Change Reviews <perforce@freebsd.org>
Subject:   PERFORCE change 103958 for review
Message-ID:  <200608150241.k7F2f4EH084782@repoman.freebsd.org>

next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=103958

Change 103958 by jb@jb_freebsd2 on 2006/08/15 02:41:00

	On Solaris this code has been linted so they are confident that the
	compiler warnings can be ignored.
	
	On FreeBSD I'd like to avoid compiler warnings.

Affected files ...

.. //depot/projects/dtrace/src/sys/contrib/opensolaris/common/ctf/ctf_labels.c#2 edit

Differences ...

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

@@ -31,7 +31,12 @@
 static int
 extract_label_info(ctf_file_t *fp, const ctf_lblent_t **ctl, uint_t *num_labels)
 {
+#if defined(sun)
 	const ctf_header_t *h;
+#else
+	ctf_header_t *h;
+	const void *p;
+#endif
 
 	/*
 	 * Labels are only supported in V2 or later
@@ -39,10 +44,17 @@
 	if (fp->ctf_version < CTF_VERSION_2)
 		return (ctf_set_errno(fp, ECTF_NOTSUP));
 
+#if defined(sun)
 	h = (const ctf_header_t *)fp->ctf_data.cts_data;
 
 	/* LINTED - pointer alignment */
 	*ctl = (const ctf_lblent_t *)(fp->ctf_buf + h->cth_lbloff);
+#else
+	h = (ctf_header_t *)fp->ctf_data.cts_data;
+
+	p = fp->ctf_buf + h->cth_lbloff;
+	*ctl = p;
+#endif
 	*num_labels = (h->cth_objtoff - h->cth_lbloff) / sizeof (ctf_lblent_t);
 
 	return (0);



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200608150241.k7F2f4EH084782>