Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 22 Sep 2014 21:02:39 +0000 (UTC)
From:      Mark Johnston <markj@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r272002 - head/cddl/contrib/opensolaris/lib/libdtrace/common
Message-ID:  <201409222102.s8ML2dXQ020240@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: markj
Date: Mon Sep 22 21:02:38 2014
New Revision: 272002
URL: http://svnweb.freebsd.org/changeset/base/272002

Log:
  Remove some variables that are no longer used as of r271413.
  
  Reported by:	Coverity
  CID:		1238924
  X-MFC-With:	r271413

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	Mon Sep 22 20:53:17 2014	(r272001)
+++ head/cddl/contrib/opensolaris/lib/libdtrace/common/drti.c	Mon Sep 22 21:02:38 2014	(r272002)
@@ -121,12 +121,12 @@ dtrace_dof_init(void)
 #if !defined(sun)
 	Elf *e;
 	Elf_Scn *scn = NULL;
-	Elf_Data *symtabdata = NULL, *dynsymdata = NULL, *dofdata = NULL;
+	Elf_Data *dofdata = NULL;
 	dof_hdr_t *dof_next = NULL;
 	GElf_Shdr shdr;
 	int efd;
 	char *s;
-	size_t shstridx, symtabidx = 0, dynsymidx = 0;
+	size_t shstridx;
 #endif
 
 	if (getenv("DTRACE_DOF_INIT_DISABLE") != NULL)
@@ -166,15 +166,9 @@ dtrace_dof_init(void)
 	dof = NULL;
 	while ((scn = elf_nextscn(e, scn)) != NULL) {
 		gelf_getshdr(scn, &shdr);
-		if (shdr.sh_type == SHT_SYMTAB) {
-			symtabidx = shdr.sh_link;
-			symtabdata = elf_getdata(scn, NULL);
-		} else if (shdr.sh_type == SHT_DYNSYM) {
-			dynsymidx = shdr.sh_link;
-			dynsymdata = elf_getdata(scn, NULL);
-		} else if (shdr.sh_type == SHT_SUNW_dof) {
+		if (shdr.sh_type == SHT_SUNW_dof) {
 			s = elf_strptr(e, shstridx, shdr.sh_name);
-			if  (s != NULL && strcmp(s, ".SUNW_dof") == 0) {
+			if (s != NULL && strcmp(s, ".SUNW_dof") == 0) {
 				dofdata = elf_getdata(scn, NULL);
 				dof = dofdata->d_buf;
 			}



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