Browse Source

fts: fix gcc compiler warning

Signed-off-by: Waldemar Brodkorb <wbx@openadk.org>
Waldemar Brodkorb 7 years ago
parent
commit
f4432e0655
1 changed files with 2 additions and 1 deletions
  1. 2 1
      libc/misc/fts/fts.c

+ 2 - 1
libc/misc/fts/fts.c

@@ -84,6 +84,7 @@ FTS *
 fts_open( char * const *argv, register int options,
 		int (*compar) (const FTSENT **, const FTSENT **))
 {
+	size_t maxarglen;
 	register FTS *sp;
 	register FTSENT *p, *root;
 	register int nitems;
@@ -114,7 +115,7 @@ fts_open( char * const *argv, register int options,
 #ifndef MAXPATHLEN
 #define MAXPATHLEN 1024
 #endif
-	size_t maxarglen = fts_maxarglen(argv);
+	maxarglen = fts_maxarglen(argv);
 	if (fts_palloc(sp, MAX(maxarglen, MAXPATHLEN)))
 		goto mem1;