summaryrefslogtreecommitdiff
path: root/util.c
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2015-10-15 09:08:36 -0500
committerCraig A. Berry <craigberry@mac.com>2015-10-15 12:22:43 -0500
commit0cc19a439196f84cece8e6a23b363e42790c834d (patch)
tree251ffa7953fb90c3a4b561db1ae4f6bc98fbee5c /util.c
parentc6824fe7faff95279179788b689804df2369aaa6 (diff)
downloadperl-0cc19a439196f84cece8e6a23b363e42790c834d.tar.gz
Revert "Missed one statbuf declaration in 45a23732c73."
This reverts commit 97466d2cbf895b35ac41b8bf7c31db955b52d48e. Adding a declaration at function scope causes unused variable warnings when there are paths that redeclare it at an inner scope.
Diffstat (limited to 'util.c')
-rw-r--r--util.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/util.c b/util.c
index 0800f381ac..967c9ef2c6 100644
--- a/util.c
+++ b/util.c
@@ -3245,7 +3245,6 @@ Perl_find_script(pTHX_ const char *scriptname, bool dosearch,
I32 len = 0;
int retval;
char *bufend;
- Stat_t statbuf;
#if defined(DOSISH) && !defined(OS2)
# define SEARCH_EXTS ".bat", ".cmd", NULL
# define MAX_EXT_LEN 4
@@ -3338,6 +3337,7 @@ Perl_find_script(pTHX_ const char *scriptname, bool dosearch,
DEBUG_p(PerlIO_printf(Perl_debug_log,
"Looking for %s\n",cur));
{
+ Stat_t statbuf;
if (PerlLIO_stat(cur,&statbuf) >= 0
&& !S_ISDIR(statbuf.st_mode)) {
dosearch = 0;