Fix compile warnings on windows platform (#2208)

This commit is contained in:
Wenyong Huang
2023-05-15 13:48:48 +08:00
committed by GitHub
parent 0899638ece
commit 1e5f206464
7 changed files with 9 additions and 10 deletions

View File

@ -384,7 +384,7 @@ wasm_runtime_atomic_wait(WASMModuleInstanceCommon *module, void *address,
/* unit of timeout is nsec, convert it to usec */
timeout_left = (uint64)timeout / 1000;
timeout_1sec = 1e6;
timeout_1sec = (uint64)1e6;
while (1) {
if (timeout < 0) {

View File

@ -270,7 +270,7 @@ local_copysignf(float x, float y)
{
union {
float f;
uint32_t i;
uint32 i;
} ux = { x }, uy = { y };
ux.i &= 0x7fffffff;
ux.i |= uy.i & 0x80000000;
@ -282,9 +282,9 @@ local_copysign(double x, double y)
{
union {
double f;
uint64_t i;
uint64 i;
} ux = { x }, uy = { y };
ux.i &= -1ULL / 2;
ux.i &= UINT64_MAX / 2;
ux.i |= uy.i & 1ULL << 63;
return ux.f;
}

View File

@ -232,7 +232,7 @@ local_copysignf(float x, float y)
{
union {
float f;
uint32_t i;
uint32 i;
} ux = { x }, uy = { y };
ux.i &= 0x7fffffff;
ux.i |= uy.i & 0x80000000;
@ -244,9 +244,9 @@ local_copysign(double x, double y)
{
union {
double f;
uint64_t i;
uint64 i;
} ux = { x }, uy = { y };
ux.i &= -1ULL / 2;
ux.i &= UINT64_MAX / 2;
ux.i |= uy.i & 1ULL << 63;
return ux.f;
}

View File

@ -561,7 +561,6 @@ pthread_create_wrapper(wasm_exec_env_t exec_env,
#if WASM_ENABLE_LIBC_WASI != 0
WASIContext *wasi_ctx;
#endif
CApiFuncImport **new_c_api_func_imports = NULL;
bh_assert(module);
bh_assert(module_inst);