[patch] remove unused code

Bernhard Fischer rep.nop at aon.at
Sat Jan 28 18:33:39 UTC 2006


Hi there,

Attached patch removes a few lines of unused code.

Ok to checkin ?
-------------- next part --------------
diff -X excl -rduNp uClibc.oorig/ldso/ldso/i386/elfinterp.c uClibc/ldso/ldso/i386/elfinterp.c
--- uClibc.oorig/ldso/ldso/i386/elfinterp.c	2005-11-21 19:08:30.000000000 +0100
+++ uClibc/ldso/ldso/i386/elfinterp.c	2006-01-28 17:57:05.000000000 +0100
@@ -47,7 +47,6 @@ extern int _dl_linux_resolve(void);
 unsigned long
 _dl_linux_resolver(struct elf_resolve *tpnt, int reloc_entry)
 {
-	int reloc_type;
 	ELF_RELOC *this_reloc;
 	char *strtab;
 	Elf32_Sym *symtab;
@@ -60,7 +59,6 @@ _dl_linux_resolver(struct elf_resolve *t
 
 	rel_addr = (char *)tpnt->dynamic_info[DT_JMPREL];
 	this_reloc = (ELF_RELOC *)(intptr_t)(rel_addr + reloc_entry);
-	reloc_type = ELF32_R_TYPE(this_reloc->r_info);
 	symtab_index = ELF32_R_SYM(this_reloc->r_info);
 
 	symtab = (Elf32_Sym *)(intptr_t)tpnt->dynamic_info[DT_SYMTAB];
diff -X excl -rduNp uClibc.oorig/ldso/libdl/libdl.c uClibc/ldso/libdl/libdl.c
--- uClibc.oorig/ldso/libdl/libdl.c	2006-01-27 08:24:49.000000000 +0100
+++ uClibc/ldso/libdl/libdl.c	2006-01-28 17:57:05.000000000 +0100
@@ -233,11 +233,9 @@ void *dlopen(const char *libname, int fl
 		runp->tpnt->init_fini = NULL; /* clear any previous dependcies */
 		for (dpnt = (ElfW(Dyn) *) runp->tpnt->dynamic_addr; dpnt->d_tag; dpnt++) {
 			if (dpnt->d_tag == DT_NEEDED) {
-				char *name;
 
 				lpntstr = (char*) (runp->tpnt->dynamic_info[DT_STRTAB] +
 						dpnt->d_un.d_val);
-				name = _dl_get_last_path_component(lpntstr);
 				_dl_if_debug_print("Trying to load '%s', needed by '%s'\n",
 						lpntstr, runp->tpnt->libname);
 				tpnt1 = _dl_load_shared_library(0, &rpnt, runp->tpnt, lpntstr, 0);
diff -X excl -rduNp uClibc.oorig/libc/inet/rpc/rcmd.c uClibc/libc/inet/rpc/rcmd.c
--- uClibc.oorig/libc/inet/rpc/rcmd.c	2006-01-27 08:24:49.000000000 +0100
+++ uClibc/libc/inet/rpc/rcmd.c	2006-01-28 17:57:05.000000000 +0100
@@ -334,13 +334,12 @@ int rresvport(int *alport)
 	    return -1;
 	}
     }
-    
+
     return -1;
 }
 libc_hidden_def(rresvport)
 
 static int  __check_rhosts_file = 1;
-static char *__rcmd_errstr;
 
 int ruserok(rhost, superuser, ruser, luser)
 	const char *rhost, *ruser, *luser;
@@ -414,7 +413,7 @@ iruserfopen (char *file, uid_t okuser)
   /* If not a regular file, if owned by someone other than user or
      root, if writeable by anyone but the owner, or if hardlinked
      anywhere, quit.  */
-  cp = NULL;
+
   if (lstat (file, &st))
     cp = "lstat failed";
   else if (!S_ISREG (st.st_mode))
@@ -437,7 +436,6 @@ iruserfopen (char *file, uid_t okuser)
   /* If there were any problems, quit.  */
   if (cp != NULL)
     {
-      __rcmd_errstr = cp;
       if (res)
 	fclose (res);
       return NULL;
diff -X excl -rduNp uClibc.oorig/libc/misc/regex/regcomp.c uClibc/libc/misc/regex/regcomp.c
--- uClibc.oorig/libc/misc/regex/regcomp.c	2006-01-24 21:40:43.000000000 +0100
+++ uClibc/libc/misc/regex/regcomp.c	2006-01-28 17:57:05.000000000 +0100
@@ -1652,8 +1652,6 @@ calc_eclosure_iter (re_node_set *new_set
       && dfa->edests[node].nelem
       && !dfa->nodes[dfa->edests[node].elems[0]].duplicated)
     {
-      int org_node, cur_node;
-      org_node = cur_node = node;
       err = duplicate_node_closure (dfa, node, node, node, constraint);
       if (BE (err != REG_NOERROR, 0))
 	return err;



More information about the uClibc mailing list