Commit 63cc351f by Jacek Caban Committed by Commit Bot

Fix PMurHash.cpp mingw clang 64-bit compilation.

Tested with Firefox build, upstream bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1471632 Change-Id: I4b44847dfc69ee26cf2215b0a0b7573becfd369d Reviewed-on: https://chromium-review.googlesource.com/1117187 Commit-Queue: Jamie Madill <jmadill@chromium.org> Reviewed-by: 's avatarJamie Madill <jmadill@chromium.org>
parent d8b1c5c5
...@@ -49,6 +49,7 @@ on big endian machines, or a byte-by-byte read if the endianess is unknown. ...@@ -49,6 +49,7 @@ on big endian machines, or a byte-by-byte read if the endianess is unknown.
#include "PMurHash.h" #include "PMurHash.h"
#include <stdint.h>
/* I used ugly type names in the header to avoid potential conflicts with /* I used ugly type names in the header to avoid potential conflicts with
* application or system typedefs & defines. Since I'm not including any more * application or system typedefs & defines. Since I'm not including any more
...@@ -208,7 +209,7 @@ void PMurHash32_Process(uint32_t *ph1, uint32_t *pcarry, const void *key, int le ...@@ -208,7 +209,7 @@ void PMurHash32_Process(uint32_t *ph1, uint32_t *pcarry, const void *key, int le
/* This CPU does not handle unaligned word access */ /* This CPU does not handle unaligned word access */
/* Consume enough so that the next data byte is word aligned */ /* Consume enough so that the next data byte is word aligned */
int i = -(long)ptr & 3; int i = -(intptr_t)ptr & 3;
if(i && i <= len) { if(i && i <= len) {
DOBYTES(i, h1, c, n, ptr, len); DOBYTES(i, h1, c, n, ptr, len);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment