This is a live mirror of the Perl 5 development currently hosted at
https://github.com/perl/perl5
https://perl5.git.perl.org
/
perl5.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
b1300a7
)
silence signed mistmatch in comparison warning in Murmurhash
author
Yves Orton
<demerphq@gmail.com>
Tue, 11 Dec 2012 07:50:58 +0000
(08:50 +0100)
committer
Yves Orton
<demerphq@gmail.com>
Mon, 18 Mar 2013 23:23:11 +0000
(
00:23
+0100)
as far as I can tell 'i' can only be positive here.
hv_func.h
patch
|
blob
|
blame
|
history
diff --git
a/hv_func.h
b/hv_func.h
index
df39808
..
866c269
100644
(file)
--- a/
hv_func.h
+++ b/
hv_func.h
@@
-381,7
+381,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 */
int i = -(long)ptr & 3;
/* Consume enough so that the next data byte is word aligned */
int i = -(long)ptr & 3;
- if(i && i <= len) {
+ if(i &&
(STRLEN)
i <= len) {
MURMUR_DOBYTES(i, h1, carry, bytes_in_carry, ptr, len);
}
MURMUR_DOBYTES(i, h1, carry, bytes_in_carry, ptr, len);
}