summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYves Orton <demerphq@gmail.com>2012-12-15 21:55:47 +0100
committerYves Orton <demerphq@gmail.com>2012-12-15 22:13:19 +0100
commit8ee91b45111f396b427530ccf9d50a687fe8636c (patch)
treef96746e9067becf5cad15c7966ee7c4ce4859c0a
parent496575ce841293eaf818395fc1f56e7fb74a18cc (diff)
downloadperl-8ee91b45111f396b427530ccf9d50a687fe8636c.tar.gz
Silence a warning under clang/asan
This should silence the following warning: dump.c:459:57: warning: comparison of constant 85 with expression of type 'svtype' is always false [-Wtautological-constant-out-of-range-compare] The warning is a false positive, this code is /meant/ to detect conditions that should not happen.
-rw-r--r--dump.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/dump.c b/dump.c
index c802732c7d..fcc63fcd8f 100644
--- a/dump.c
+++ b/dump.c
@@ -456,7 +456,8 @@ Perl_sv_peek(pTHX_ SV *sv)
sv_catpv(t, "VOID");
goto finish;
}
- else if (sv == (const SV *)0x55555555 || SvTYPE(sv) == 'U') {
+ else if (sv == (const SV *)0x55555555 || ((char)SvTYPE(sv)) == 'U') {
+ /* detect data corruption under memory poisoning */
sv_catpv(t, "WILD");
goto finish;
}