Date: Fri, 23 Nov 2007 03:15:23 GMT From: John Birrell <jb@FreeBSD.org> To: Perforce Change Reviews <perforce@freebsd.org> Subject: PERFORCE change 129404 for review Message-ID: <200711230315.lAN3FNAj008705@repoman.freebsd.org>
next in thread | raw e-mail | index | archive | help
http://perforce.freebsd.org/chv.cgi?CH=129404 Change 129404 by jb@jb_freebsd1 on 2007/11/23 03:14:22 Strict aliasing fixes. Affected files ... .. //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/alist.c#5 edit .. //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/dwarf.c#10 edit .. //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/merge.c#9 edit Differences ... ==== //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/alist.c#5 (text) ==== @@ -123,14 +123,17 @@ int alist_find(alist_t *alist, void *name, void **value) { - alist_el_t template, *ret; + alist_el_t template, *retx; + void *ret; template.ale_name = name; - if (!hash_find(alist->al_elements, &template, (void **)&ret)) + if (!hash_find(alist->al_elements, &template, &ret)) return (0); - if (value) - *value = ret->ale_value; + if (value) { + retx = ret; + *value = retx->ale_value; + } return (1); } ==== //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/dwarf.c#10 (text) ==== @@ -160,11 +160,12 @@ static tdesc_t * tdesc_lookup(dwarf_t *dw, int tid) { - tdesc_t tmpl, *tdp; + tdesc_t tmpl; + void *tdp; tmpl.t_id = tid; - if (hash_find(dw->dw_tidhash, &tmpl, (void **)&tdp)) + if (hash_find(dw->dw_tidhash, &tmpl, &tdp)) return (tdp); else return (NULL); ==== //depot/projects/dtrace/src/contrib/opensolaris/tools/ctf/cvt/merge.c#9 (text) ==== @@ -190,10 +190,10 @@ static tid_t get_mapping(alist_t *ta, int srcid) { - long ltgtid; + void *ltgtid; if (alist_find(ta, (void *)(uintptr_t)srcid, (void **)<gtid)) - return ((tid_t)ltgtid); + return ((uintptr_t)ltgtid); else return (0); } @@ -872,7 +872,7 @@ fwd_redir(tdesc_t *fwd, tdesc_t **fwdp, void *private) { alist_t *map = private; - tdesc_t *defn; + void *defn; if (!alist_find(map, (void *)fwd, (void **)&defn)) return (0);
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200711230315.lAN3FNAj008705>