summaryrefslogtreecommitdiff
path: root/hv_func.h
diff options
context:
space:
mode:
authorDaniel Dragan <bulk88@hotmail.com>2014-12-23 00:35:24 -0500
committerFather Chrysostomos <sprout@cpan.org>2014-12-23 09:22:16 -0800
commitb404539126a567987b4748a67c06be2d23b471d5 (patch)
tree8987b95adf8077a6703b485e160b25f8a94a9447 /hv_func.h
parent2f15ba3e036b1e5e8181053654f0bd51cb56c5f3 (diff)
downloadperl-b404539126a567987b4748a67c06be2d23b471d5.tar.gz
silence VC Win64 perl warnings in hv_func.h
These warnings are in a public header, hv_func.h, so CPAN XS builders will see 8 warnings with every .c file from a CPAN XS module that they will compile. Silence the warnings since headers should never warn unconditionally. See [perl #123483] for details.
Diffstat (limited to 'hv_func.h')
-rw-r--r--hv_func.h16
1 files changed, 8 insertions, 8 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);