Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 15 Dec 2011 22:10:27 +0000 (UTC)
From:      Dimitry Andric <dim@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r228547 - head/cddl/contrib/opensolaris/lib/libdtrace/common
Message-ID:  <201112152210.pBFMARRE072926@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: dim
Date: Thu Dec 15 22:10:27 2011
New Revision: 228547
URL: http://svn.freebsd.org/changeset/base/228547

Log:
  Cast away a clang alignment warning in drti.c's fixsymbol() function.
  This code only runs on i386 and amd64, so there should be no problems if
  buf + sec->dofs_offset is not aligned (which is unlikely anyway).
  
  MFC after:	1 week

Modified:
  head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c

Modified: head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c
==============================================================================
--- head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c	Thu Dec 15 22:08:08 2011	(r228546)
+++ head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c	Thu Dec 15 22:10:27 2011	(r228547)
@@ -102,7 +102,7 @@ fixsymbol(Elf *e, Elf_Data *data, size_t
 	int ndx;
 
 	while (gelf_getsym(data, j++, &sym) != NULL) {
-		prb = (dof_probe_t *)(buf + sec->dofs_offset);
+		prb = (dof_probe_t *)(void *)(buf + sec->dofs_offset);
 
 		for (ndx = nprobes; ndx; ndx--, prb += 1) {
 			funcname = dofstrtab + prb->dofpr_func;



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