summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hv_func.h16
-rw-r--r--pod/perldelta.pod14
2 files changed, 20 insertions, 10 deletions
diff --git a/hv_func.h b/hv_func.h
index b3eea0071f..24ebf5600c 100644
--- a/hv_func.h
+++ b/hv_func.h
@@ -269,7 +269,7 @@ S_perl_hash_siphash_2_4(const unsigned char * const seed, const unsigned char *i
PERL_STATIC_INLINE U32
S_perl_hash_superfast(const unsigned char * const seed, const unsigned char *str, STRLEN len) {
- U32 hash = *((U32*)seed) + len;
+ U32 hash = *((U32*)seed) + (U32)len;
U32 tmp;
int rem= len & 3;
len >>= 2;
@@ -379,7 +379,7 @@ S_perl_hash_murmur3(const unsigned char * const seed, const unsigned char *ptr,
const unsigned char *end;
int bytes_in_carry = 0; /* bytes in carry */
- I32 total_length= len;
+ I32 total_length= (I32)len;
#if defined(UNALIGNED_SAFE)
/* Handle carry: commented out as its only used in incremental mode - it never fires for us
@@ -402,7 +402,7 @@ S_perl_hash_murmur3(const unsigned char * const seed, const unsigned char *ptr,
/* Consume enough so that the next data byte is word aligned */
STRLEN i = -PTR2IV(ptr) & 3;
if(i && i <= len) {
- MURMUR_DOBYTES(i, h1, carry, bytes_in_carry, ptr, len);
+ MURMUR_DOBYTES((int)i, h1, carry, bytes_in_carry, ptr, len);
}
/* We're now aligned. Process in aligned blocks. Specialise for each possible carry count */
@@ -443,7 +443,7 @@ S_perl_hash_murmur3(const unsigned char * const seed, const unsigned char *ptr,
len -= len/4*4;
/* Append any remaining bytes into carry */
- MURMUR_DOBYTES(len, h1, carry, bytes_in_carry, ptr, len);
+ MURMUR_DOBYTES((int)len, h1, carry, bytes_in_carry, ptr, len);
if (bytes_in_carry) {
k1 = carry >> ( 4 - bytes_in_carry ) * 8;
@@ -467,7 +467,7 @@ S_perl_hash_murmur3(const unsigned char * const seed, const unsigned char *ptr,
PERL_STATIC_INLINE U32
S_perl_hash_djb2(const unsigned char * const seed, const unsigned char *str, const STRLEN len) {
const unsigned char * const end = (const unsigned char *)str + len;
- U32 hash = *((U32*)seed) + len;
+ U32 hash = *((U32*)seed) + (U32)len;
while (str < end) {
hash = ((hash << 5) + hash) + *str++;
}
@@ -477,7 +477,7 @@ S_perl_hash_djb2(const unsigned char * const seed, const unsigned char *str, con
PERL_STATIC_INLINE U32
S_perl_hash_sdbm(const unsigned char * const seed, const unsigned char *str, const STRLEN len) {
const unsigned char * const end = (const unsigned char *)str + len;
- U32 hash = *((U32*)seed) + len;
+ U32 hash = *((U32*)seed) + (U32)len;
while (str < end) {
hash = (hash << 6) + (hash << 16) - hash + *str++;
}
@@ -503,7 +503,7 @@ S_perl_hash_sdbm(const unsigned char * const seed, const unsigned char *str, con
PERL_STATIC_INLINE U32
S_perl_hash_one_at_a_time(const unsigned char * const seed, const unsigned char *str, const STRLEN len) {
const unsigned char * const end = (const unsigned char *)str + len;
- U32 hash = *((U32*)seed) + len;
+ U32 hash = *((U32*)seed) + (U32)len;
while (str < end) {
hash += *str++;
hash += (hash << 10);
@@ -518,7 +518,7 @@ S_perl_hash_one_at_a_time(const unsigned char * const seed, const unsigned char
PERL_STATIC_INLINE U32
S_perl_hash_one_at_a_time_hard(const unsigned char * const seed, const unsigned char *str, const STRLEN len) {
const unsigned char * const end = (const unsigned char *)str + len;
- U32 hash = *((U32*)seed) + len;
+ U32 hash = *((U32*)seed) + (U32)len;
while (str < end) {
hash += (hash << 10);
diff --git a/pod/perldelta.pod b/pod/perldelta.pod
index 54be512cf4..2064551f34 100644
--- a/pod/perldelta.pod
+++ b/pod/perldelta.pod
@@ -305,9 +305,19 @@ L</Modules and Pragmata> section.
=over 4
-=item XXX-some-platform
+=item Win32
-XXX
+=over 4
+
+=item *
+
+Previously, on Visual C++ for Win64 built Perls only, when compiling every Perl
+XS module (including CPAN ones) and Perl aware .c file with a 64 bit Visual C++,
+would uncondtionally have around a dozen warnings from hv_func.h. These
+warnings have been silenced. GCC all bitness and Visual C++ for Win32 were
+not affected.
+
+=back
=back