summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCraig A. Berry <craigberry@mac.com>2012-02-12 06:10:42 -0600
committerCraig A. Berry <craigberry@mac.com>2012-02-12 06:10:42 -0600
commit3129e2be3ef6d3c824031a00459b4d9c42d113fe (patch)
tree4d47399c790323411c4fe15c3f57d96389a893ca
parent9b11155f22b79ab694ba82561603ecc1bb9969c0 (diff)
downloadperl-3129e2be3ef6d3c824031a00459b4d9c42d113fe.tar.gz
Cast around signedness warnings in POSIX's new strptime.
-rw-r--r--ext/POSIX/POSIX.xs6
1 files changed, 3 insertions, 3 deletions
diff --git a/ext/POSIX/POSIX.xs b/ext/POSIX/POSIX.xs
index 89d543e5cb..57b353d390 100644
--- a/ext/POSIX/POSIX.xs
+++ b/ext/POSIX/POSIX.xs
@@ -1909,7 +1909,7 @@ strptime(str, fmt, sec=-1, min=-1, hour=-1, mday=-1, mon=-1, year=-1, wday=-1, y
str_c = SvPV_nolen(str);
if(str_offset) {
- str_offset = utf8_hop(str_c, str_offset) - (U8*)str_c;
+ str_offset = utf8_hop((U8*)str_c, str_offset) - (U8*)str_c;
}
}
else if(SvUTF8(str) && !SvUTF8(fmt)) {
@@ -1923,7 +1923,7 @@ strptime(str, fmt, sec=-1, min=-1, hour=-1, mday=-1, mon=-1, year=-1, wday=-1, y
str_c = SvPV_nolen(str);
if(str_offset) {
- orig_bytes = SvPV_nolen(orig_str);
+ orig_bytes = (U8*)SvPV_nolen(orig_str);
str_offset = utf8_distance(orig_bytes + str_offset, orig_bytes);
}
}
@@ -1946,7 +1946,7 @@ strptime(str, fmt, sec=-1, min=-1, hour=-1, mday=-1, mon=-1, year=-1, wday=-1, y
if(SvUTF8(str))
/* str is a UTF-8 upgraded copy of the original non-UTF-8
* string the caller referred us to in orig_str */
- str_offset = utf8_distance(remains, str_c);
+ str_offset = utf8_distance((U8*)remains, (U8*)str_c);
else
str_offset = utf8_hop(orig_bytes, remains - str_c) - orig_bytes;