summaryrefslogtreecommitdiff
path: root/taint.c
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2013-05-09 14:23:38 +0100
committerDavid Mitchell <davem@iabyn.com>2013-05-09 14:34:00 +0100
commit9a9b5ec9e94e1e207c265a6acd160fc49bca06fa (patch)
tree6d172543e9d62b5ce6dd790ada6130c3bdeae0c7 /taint.c
parent3231f5793f6a3d7ee78eb1d68feb05c064b33315 (diff)
downloadperl-9a9b5ec9e94e1e207c265a6acd160fc49bca06fa.tar.gz
silence warnings under NO_TAINT_SUPPORT
The are lots of places where local vars aren't used when compiled with NO_TAINT_SUPPORT.
Diffstat (limited to 'taint.c')
-rw-r--r--taint.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/taint.c b/taint.c
index 4ebba5bc4a..fab98ec2ce 100644
--- a/taint.c
+++ b/taint.c
@@ -110,6 +110,9 @@ Perl_taint_env(pTHX)
taint_proper("%%ENV is aliased to %%%s%s", name);
/* this statement is reached under -t or -U */
TAINT_set(was_tainted);
+#ifdef NO_TAINT_SUPPORT
+ PERL_UNUSED_VAR(was_tainted);
+#endif
}
#ifdef VMS
@@ -157,7 +160,11 @@ Perl_taint_env(pTHX)
const bool was_tainted = TAINT_get;
const char *t = SvPV_const(*svp, len);
const char * const e = t + len;
+
TAINT_set(was_tainted);
+#ifdef NO_TAINT_SUPPORT
+ PERL_UNUSED_VAR(was_tainted);
+#endif
if (t < e && isWORDCHAR(*t))
t++;
while (t < e && (isWORDCHAR(*t) || strchr("-_.+", *t)))