summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPali <pali@cpan.org>2019-12-02 16:09:46 +0100
committerKarl Williamson <khw@cpan.org>2019-12-02 08:23:11 -0800
commitfd702cc51b6c8b1b795ef7470ef0dd49ba136e2c (patch)
treefd0d538ca8ce4fdf383ca4d507b99a598653e6ec
parent2feceb12f1b1d0edf289cb83c9dd1e244db719cb (diff)
downloadperl-fd702cc51b6c8b1b795ef7470ef0dd49ba136e2c.tar.gz
Storable: Fix compile warning: comparison between signed and unsigned integer expressions
gcc -m32 -c -fwrapv -fno-strict-aliasing -pipe -fstack-protector-strong -I/usr/local/include -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64 -D_FORTIFY_SOURCE=2 -Wall -Werror=declaration-after-statement -Werror=pointer-arith -Wextra -Wc++-compat -Wwrite-strings -O2 -DVERSION=\"3.18\" -DXS_VERSION=\"3.18\" -fPIC "-I../.." Storable.c Storable.xs: In function ‘retrieve_lvstring’: Storable.xs:1238:46: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] else if (PerlIO_read(cxt->fio, x, y) != y) { \ ^ Storable.xs:1238:46: note: in definition of macro ‘SAFEPVREAD’ else if (PerlIO_read(cxt->fio, x, y) != y) { \ ^~
-rw-r--r--dist/Storable/Storable.xs2
1 files changed, 1 insertions, 1 deletions
diff --git a/dist/Storable/Storable.xs b/dist/Storable/Storable.xs
index b68ebda4a0..2f112c1f1a 100644
--- a/dist/Storable/Storable.xs
+++ b/dist/Storable/Storable.xs
@@ -5958,7 +5958,7 @@ static SV *retrieve_lvstring(pTHX_ stcxt_t *cxt, const char *cname)
}
New(10003, s, len+1, char);
- SAFEPVREAD(s, len, s);
+ SAFEPVREAD(s, (I32)len, s);
sv = retrieve(aTHX_ cxt, cname);
if (!sv) {