Fix MSVC build issues
Release / release (push) Successful in 16s

This commit is contained in:
abdelrahman committed 2026-10-29 02:15:17 +00:00
1 parent 188cfae0d7
commit 5687cb512c
21 files changed
+108 -27

No files matched your search

+5
View File
@@ -7,8 +7,13 @@
// compile and run any of them on any platform, but your performance with the
// non-native version will be less than optimal.
#include "wapp.h"
#include "MurmurHash3.h"
#ifdef WP_PLATFORM_WINDOWS
#pragma warning(disable:5045)
#endif
//-----------------------------------------------------------------------------
// Platform-specific functions and macros
+5
View File
@@ -7,8 +7,13 @@
// compile and run any of them on any platform, but your performance with the
// non-native version will be less than optimal.
#include "wapp.h"
#include "MurmurHash3.h"
#ifdef WP_PLATFORM_WINDOWS
#pragma warning(disable:5045)
#endif
//-----------------------------------------------------------------------------
// Platform-specific functions and macros
+1 -1
View File
@@ -102,7 +102,7 @@ int siphash(const void *in, const size_t inlen, const void *k, uint8_t *out,
uint64_t m;
int i;
const unsigned char *end = ni + inlen - (inlen % sizeof(uint64_t));
const int left = inlen & 7;
const int left = (const int)(inlen & 7);
uint64_t b = ((uint64_t)inlen) << 56;
v3 ^= k1;
v2 ^= k0;
+3 -3
View File
@@ -22,19 +22,19 @@ WpTestFuncResult test_murmur3(void) {
// Sring hash
WpU128 mur_hash = hasher.func(&str_bytes, hasher.ctx);
MurmurHash3_x64_128(str_bytes.data, str_bytes.count * str_bytes.item_size, hasher.ctx.murmur3, (void *)hash);
MurmurHash3_x64_128(str_bytes.data, (i32)(str_bytes.count * str_bytes.item_size), hasher.ctx.murmur3, (void *)hash);
result = result && mur_hash.value[0] == hash[0] && mur_hash.value[1] == hash[1];
// Array hash
mur_hash = hasher.func(&arr_bytes, hasher.ctx);
MurmurHash3_x64_128(arr_bytes.data, arr_bytes.count * arr_bytes.item_size, hasher.ctx.murmur3, (void *)hash);
MurmurHash3_x64_128(arr_bytes.data, (i32)(arr_bytes.count * arr_bytes.item_size), hasher.ctx.murmur3, (void *)hash);
result = result && mur_hash.value[0] == hash[0] && mur_hash.value[1] == hash[1];
// Number hash
mur_hash = hasher.func(&num_bytes, hasher.ctx);
MurmurHash3_x64_128(num_bytes.data, num_bytes.count * num_bytes.item_size, hasher.ctx.murmur3, (void *)hash);
MurmurHash3_x64_128(num_bytes.data, (i32)(num_bytes.count * num_bytes.item_size), hasher.ctx.murmur3, (void *)hash);
result = result && mur_hash.value[0] == hash[0] && mur_hash.value[1] == hash[1];
+3 -3
View File
@@ -22,19 +22,19 @@ WpTestFuncResult test_murmur3(void) {
// Sring hash
WpU128 mur_hash = hasher.func(&str_bytes, hasher.ctx);
MurmurHash3_x64_128(str_bytes.data, str_bytes.count * str_bytes.item_size, hasher.ctx.murmur3, (void *)hash);
MurmurHash3_x64_128(str_bytes.data, (i32)(str_bytes.count * str_bytes.item_size), hasher.ctx.murmur3, (void *)hash);
result = result && mur_hash.value[0] == hash[0] && mur_hash.value[1] == hash[1];
// Array hash
mur_hash = hasher.func(&arr_bytes, hasher.ctx);
MurmurHash3_x64_128(arr_bytes.data, arr_bytes.count * arr_bytes.item_size, hasher.ctx.murmur3, (void *)hash);
MurmurHash3_x64_128(arr_bytes.data, (i32)(arr_bytes.count * arr_bytes.item_size), hasher.ctx.murmur3, (void *)hash);
result = result && mur_hash.value[0] == hash[0] && mur_hash.value[1] == hash[1];
// Number hash
mur_hash = hasher.func(&num_bytes, hasher.ctx);
MurmurHash3_x64_128(num_bytes.data, num_bytes.count * num_bytes.item_size, hasher.ctx.murmur3, (void *)hash);
MurmurHash3_x64_128(num_bytes.data, (i32)(num_bytes.count * num_bytes.item_size), hasher.ctx.murmur3, (void *)hash);
result = result && mur_hash.value[0] == hash[0] && mur_hash.value[1] == hash[1];
+4
View File
@@ -3,6 +3,10 @@
#include "wapp.h"
#include "test_hashmap.h"
#ifdef WP_PLATFORM_WINDOWS
#pragma warning(disable:5045)
#endif
wp_persist inline WpU8Stream encoder(void *data);
wp_persist inline b8 key_eq(void *a, void *b);
+4
View File
@@ -3,6 +3,10 @@
#include "wapp.h"
#include "test_hashmap.h"
#ifdef WP_PLATFORM_WINDOWS
#pragma warning(disable:5045)
#endif
wp_persist inline WpU8Stream encoder(void *data);
wp_persist inline b8 key_eq(void *a, void *b);
+4
View File
@@ -3,6 +3,10 @@
#include "wapp.h"
#include "test_hashset.h"
#ifdef WP_PLATFORM_WINDOWS
#pragma warning(disable:5045)
#endif
wp_persist inline WpU8Stream encoder(void *data);
wp_persist inline b8 key_eq(void *a, void *b);
+4
View File
@@ -3,6 +3,10 @@
#include "wapp.h"
#include "test_hashset.h"
#ifdef WP_PLATFORM_WINDOWS
#pragma warning(disable:5045)
#endif
wp_persist inline WpU8Stream encoder(void *data);
wp_persist inline b8 key_eq(void *a, void *b);