Commit 408e7fa3 authored by Nirbheek Chauhan's avatar Nirbheek Chauhan 🐜
Browse files

orc: Fix some warnings on MSVC and enable --werror

Part-of: <!42>
parent cd8eabf0
......@@ -48,7 +48,7 @@ debian sid:
# Environment variables substitutions is done by PowerShell before calling
# cmd.exe, that's why we use $env:FOO instead of %FOO%
- cmd.exe /C "C:\BuildTools\Common7\Tools\VsDevCmd.bat -host_arch=amd64 -arch=$env:ARCH &&
meson build $env:MESON_ARGS &&
meson --werror build $env:MESON_ARGS &&
ninja -C build &&
ninja -C build test"
......@@ -75,6 +75,6 @@ msys2:
- C:\msys64\usr\bin\bash -c "pacman-key --init && pacman-key --populate msys2 && pacman-key --refresh-keys || true"
- C:\msys64\usr\bin\bash -c "pacman -Syuu --noconfirm"
- C:\msys64\usr\bin\bash -c "pacman -Sy --noconfirm --needed mingw-w64-x86_64-toolchain ninja"
- C:\msys64\usr\bin\bash -c "meson build $env:MESON_ARGS &&
- C:\msys64\usr\bin\bash -c "meson --werror build $env:MESON_ARGS &&
ninja -C build &&
ninja -C build test"
......@@ -21,7 +21,7 @@ main (int argc, char *argv[])
}
/* Call a function that uses Orc */
audio_add_mono_to_stereo_scaled_s16 (c, a, b, volume*4096, N);
audio_add_mono_to_stereo_scaled_s16 (c, a, b, (int) (volume*4096), N);
/* Print the results */
for(i=0;i<N;i++){
......
......@@ -4896,7 +4896,7 @@ emulate_convlf (OrcOpcodeExecutor *ex, int offset, int n)
/* 0: loadl */
var32 = ptr4[i];
/* 1: convlf */
var33.f = var32.i;
var33.f = (float) var32.i;
/* 2: storel */
ptr0[i] = var33;
}
......@@ -5279,7 +5279,7 @@ emulate_convdl (OrcOpcodeExecutor *ex, int offset, int n)
/* 1: convdl */
{
int tmp;
tmp = var32.f;
tmp = (int) var32.f;
if (tmp == 0x80000000 && !(var32.i & ORC_UINT64_C(0x8000000000000000))) tmp = 0x7fffffff;
var33.i = tmp;
}
......
......@@ -95,16 +95,16 @@ main(int argc, char *argv[])
#endif
orc_get_data_cache_sizes (&level1, &level2, &level3);
if (level3 > 0) {
max = (log(level3)/M_LN2 - 6.0) * 10 + 20;
max = (int) ((log(level3)/M_LN2 - 6.0) * 10 + 20);
} else if (level2 > 0) {
max = (log(level2)/M_LN2 - 6.0) * 10 + 20;
max = (int) ((log(level2)/M_LN2 - 6.0) * 10 + 20);
} else {
max = 140;
}
for(i=0;i<max;i+=2){
double x = i*0.1 + 6.0;
int size = pow(2.0, x);
int size = (int) pow(2.0, x);
if (size > MAX_SIZE_TO_CHECK) {
printf ("Stopping test, exceeding maximum size to check (%d, could do above %d)\n",
......
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