Fix compilation warnings (#754)

This commit is contained in:
Wenyong Huang 2021-09-16 16:36:42 +08:00 committed by GitHub
parent 76d641c7ea
commit 310feb6536
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 7 additions and 5 deletions

View File

@ -6,12 +6,11 @@
#ifndef _AOT_INTRINSIC_H
#define _AOT_INTRINSIC_H
#include "aot_runtime.h"
#if WASM_ENABLE_WAMR_COMPILER != 0
#include "aot_llvm.h"
#endif
#include "aot_runtime.h"
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -534,7 +534,8 @@ static double freebsd_atan2(double y, double x)
case 0:
case 1: return y; /* atan(+-0,+anything)=+-0 */
case 2: return pi+tiny;/* atan(+0,-anything) = pi */
case 3: return -pi-tiny;/* atan(-0,-anything) =-pi */
case 3:
default: return -pi-tiny;/* atan(-0,-anything) =-pi */
}
}
/* when x = 0 */
@ -547,14 +548,16 @@ static double freebsd_atan2(double y, double x)
case 0: return pi_o_4+tiny;/* atan(+INF,+INF) */
case 1: return -pi_o_4-tiny;/* atan(-INF,+INF) */
case 2: return 3.0*pi_o_4+tiny;/*atan(+INF,-INF)*/
case 3: return -3.0*pi_o_4-tiny;/*atan(-INF,-INF)*/
case 3:
default: return -3.0*pi_o_4-tiny;/*atan(-INF,-INF)*/
}
} else {
switch(m) {
case 0: return zero ; /* atan(+...,+INF) */
case 1: return -zero ; /* atan(-...,+INF) */
case 2: return pi+tiny ; /* atan(+...,-INF) */
case 3: return -pi-tiny ; /* atan(-...,-INF) */
case 3:
default: return -pi-tiny ; /* atan(-...,-INF) */
}
}
}