From owner-p4-projects@FreeBSD.ORG Mon Jul 3 09:42:43 2006 Return-Path: X-Original-To: p4-projects@freebsd.org Delivered-To: p4-projects@freebsd.org Received: by hub.freebsd.org (Postfix, from userid 32767) id 549E116A47C; Mon, 3 Jul 2006 09:42:43 +0000 (UTC) X-Original-To: perforce@freebsd.org Delivered-To: perforce@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DAD4F16A415 for ; Mon, 3 Jul 2006 09:42:42 +0000 (UTC) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (repoman.freebsd.org [216.136.204.115]) by mx1.FreeBSD.org (Postfix) with ESMTP id B616143D66 for ; Mon, 3 Jul 2006 09:42:38 +0000 (GMT) (envelope-from jb@freebsd.org) Received: from repoman.freebsd.org (localhost [127.0.0.1]) by repoman.freebsd.org (8.13.6/8.13.6) with ESMTP id k639gcQg065522 for ; Mon, 3 Jul 2006 09:42:38 GMT (envelope-from jb@freebsd.org) Received: (from perforce@localhost) by repoman.freebsd.org (8.13.6/8.13.4/Submit) id k639gcrO065519 for perforce@freebsd.org; Mon, 3 Jul 2006 09:42:38 GMT (envelope-from jb@freebsd.org) Date: Mon, 3 Jul 2006 09:42:38 GMT Message-Id: <200607030942.k639gcrO065519@repoman.freebsd.org> X-Authentication-Warning: repoman.freebsd.org: perforce set sender to jb@freebsd.org using -f From: John Birrell To: Perforce Change Reviews Cc: Subject: PERFORCE change 100477 for review X-BeenThere: p4-projects@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: p4 projects tree changes List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 03 Jul 2006 09:42:43 -0000 http://perforce.freebsd.org/chv.cgi?CH=100477 Change 100477 by jb@jb_freebsd2 on 2006/07/03 09:41:50 I wish Sun would turn up their compiler warning levels and stop their programmers from casting variables and function pointers. Casting always causes problems porting code other other architectures. (I will probably get yelled at for saying this, but it's TRUE!) Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/alist.c#2 edit .. //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/merge.c#4 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/alist.c#2 (text) ==== @@ -171,13 +171,13 @@ { printf("Key: "); if (alist_def_print_cb_key_int == 1) - printf("%5d ", (int)key); + printf("%5lu ", (ulong_t)key); else printf("%s\n", (char *)key); printf("Value: "); if (alist_def_print_cb_value_int == 1) - printf("%5d\n", (int)value); + printf("%5lu\n", (ulong_t)value); else printf("%s\n", (char *)key); ==== //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/merge.c#4 (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 *)(ulong_t)srcid, NULL)); assert(srcid != 0 && tgtid != 0); - alist_add(ta, (void *)srcid, (void *)tgtid); + alist_add(ta, (void *)(ulong_t)srcid, (void *)(ulong_t)tgtid); } static tid_t @@ -192,7 +192,7 @@ { long ltgtid; - if (alist_find(ta, (void *)srcid, (void **)<gtid)) + if (alist_find(ta, (void *)(ulong_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 = (ulong_t)value; redir_mstr_data_t *rmd = arg; tdesc_t template; tdesc_t *defn;