Date: Sun, 3 Dec 2006 02:00:52 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 110917 for review Message-ID: <200612030200.kB320qxD007017@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=110917 Change 110917 by jb@jb_freebsd8 on 2006/12/03 02:00:27 Cast integers up to uintptr_t before casting to void * to avoid compiler warnings about size mismatches. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/merge.c#6 edit .. //depot/projects/opensolaris/contrib/opensolaris/tools/ctf/cvt/merge.c#3 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/merge.c#6 (text) ==== @@ -181,10 +181,10 @@ { debug(3, "Adding mapping %u => %u\n", srcid, tgtid); - assert(!alist_find(ta, (void *)(ulong_t)srcid, NULL)); + assert(!alist_find(ta, (void *)(uintptr_t)srcid, NULL)); assert(srcid != 0 && tgtid != 0); - alist_add(ta, (void *)(ulong_t)srcid, (void *)(ulong_t)tgtid); + alist_add(ta, (void *)(uintptr_t)srcid, (void *)(uintptr_t)tgtid); } static tid_t @@ -192,7 +192,7 @@ { long ltgtid; - if (alist_find(ta, (void *)(ulong_t)srcid, (void **)<gtid)) + if (alist_find(ta, (void *)(uintptr_t)srcid, (void **)<gtid)) return ((int)ltgtid); else return (0); @@ -908,7 +908,7 @@ redir_mstr_fwd_cb(void *name, void *value, void *arg) { tdesc_t *fwd = name; - int defnid = (ulong_t)value; + int defnid = (uintptr_t)value; redir_mstr_data_t *rmd = arg; tdesc_t template; tdesc_t *defn; ==== //depot/projects/opensolaris/contrib/opensolaris/tools/ctf/cvt/merge.c#3 (text) ==== @@ -181,10 +181,10 @@ { debug(3, "Adding mapping %u => %u\n", srcid, tgtid); - assert(!alist_find(ta, (void *)srcid, NULL)); + assert(!alist_find(ta, (void *)(uintptr_t)srcid, NULL)); assert(srcid != 0 && tgtid != 0); - alist_add(ta, (void *)srcid, (void *)tgtid); + alist_add(ta, (void *)(uintptr_t)srcid, (void *)(uintptr_t)tgtid); } static tid_t @@ -192,7 +192,7 @@ { long ltgtid; - if (alist_find(ta, (void *)srcid, (void **)<gtid)) + if (alist_find(ta, (void *)(uintptr_t)srcid, (void **)<gtid)) return ((int)ltgtid); else return (0); @@ -908,7 +908,7 @@ redir_mstr_fwd_cb(void *name, void *value, void *arg) { tdesc_t *fwd = name; - int defnid = (int)value; + int defnid = (uintptr_t)value; redir_mstr_data_t *rmd = arg; tdesc_t template; tdesc_t *defn;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200612030200.kB320qxD007017>