Browse Source

libc: silence warning in fts

cderrno is dead code, comment it out.

Signed-off-by: Bernhard Reutner-Fischer <rep.dot.nop@gmail.com>
Bernhard Reutner-Fischer 10 years ago
parent
commit
daec167746
1 changed files with 3 additions and 3 deletions
  1. 3 3
      libc/misc/fts/fts.c

+ 3 - 3
libc/misc/fts/fts.c

@@ -577,7 +577,7 @@ fts_build(register FTS *sp, int type)
 	FTSENT *cur, *tail;
 	DIR *dirp;
 	void *oldaddr;
-	int cderrno, descend, len, level, nlinks, saved_errno,
+	int /*cderrno,*/ descend, len, level, nlinks, saved_errno,
 	    nostat, doadjust;
 	size_t maxlen;
 	char *cp;
@@ -642,14 +642,14 @@ fts_build(register FTS *sp, int type)
 	 * needed sorted entries or stat information, they had better be
 	 * checking FTS_NS on the returned nodes.
 	 */
-	cderrno = 0;
+	/* cderrno = 0; */
 	if (nlinks || type == BREAD) {
 		if (fts_safe_changedir(sp, cur, dirfd(dirp), NULL)) {
 			if (nlinks && type == BREAD)
 				cur->fts_errno = errno;
 			cur->fts_flags |= FTS_DONTCHDIR;
 			descend = 0;
-			cderrno = errno;
+			/* cderrno = errno; */
 			(void)closedir(dirp);
 			dirp = NULL;
 		} else