From 27714e151f35ac31f3554e370d87154c0b770861 Mon Sep 17 00:00:00 2001 From: Mike Danes Date: Sun, 20 Dec 2015 12:29:13 +0200 Subject: Cleanup warnings in native test projects Most of the warnings (>10000) are generated by /Wall. It doesn't make much sense to use /Wall but since there's only a small number of warning types that cause issues I left /Wall in and disabled those particular warning types. A few other warnings were caused by actual code issues (signed/unsigned mismatch, pointer cast to int, unused variables) which I fixed. --- tests/CMakeLists.txt | 2 +- tests/src/Common/Platform/platformdefines.cpp | 12 +++++------- tests/src/JIT/Directed/StructABI/CMakeLists.txt | 2 ++ .../JIT/Methodical/structs/systemvbringup/structinregs.cpp | 8 ++++---- tests/src/JIT/jit64/mcc/interop/native_i0c.cpp | 4 ++-- tests/src/JIT/jit64/mcc/interop/native_i0s.cpp | 2 +- tests/src/JIT/jit64/mcc/interop/native_i1c.cpp | 6 +++++- 7 files changed, 20 insertions(+), 16 deletions(-) diff --git a/tests/CMakeLists.txt b/tests/CMakeLists.txt index 2021fd1add..c4d43896be 100644 --- a/tests/CMakeLists.txt +++ b/tests/CMakeLists.txt @@ -9,7 +9,7 @@ endif() # Compile options if (WIN32) - add_compile_options(-wd4820) + add_compile_options(-wd4100 -wd4514 -wd4668 -wd4710 -wd4711 -wd4820) endif() if(CLR_CMAKE_PLATFORM_UNIX) diff --git a/tests/src/Common/Platform/platformdefines.cpp b/tests/src/Common/Platform/platformdefines.cpp index 86e71aefcc..4caead59ea 100644 --- a/tests/src/Common/Platform/platformdefines.cpp +++ b/tests/src/Common/Platform/platformdefines.cpp @@ -31,7 +31,6 @@ LPSTR HackyConvertToSTR(LPWSTR pwszInput) { size_t cchInput; LPSTR pszOutput; - LPWSTR pStr; if (NULL == pwszInput) return NULL; @@ -49,7 +48,7 @@ LPSTR HackyConvertToSTR(LPWSTR pwszInput) error_t TP_scpy_s(LPWSTR strDestination, size_t sizeInWords, LPCWSTR strSource) { - int cnt; + size_t cnt; // copy sizeInBytes bytes of strSource into strDestination if (NULL == strDestination || NULL == strSource) return 1; @@ -189,7 +188,7 @@ void TP_ZeroMemory(LPVOID buffer, size_t sizeInBytes) if (NULL == buffer) return; bBuf = (BYTE*)buffer; - for(int i=0; i(a01 + a02 + a03 + a04 + a05 + a06 + a07 + a08 + a09 + a10 + a11 + a12); result.count = 12; result.average = (double)result.sum / result.count; result.dummy1 = result.sum; diff --git a/tests/src/JIT/jit64/mcc/interop/native_i1c.cpp b/tests/src/JIT/jit64/mcc/interop/native_i1c.cpp index 0edeeeffa5..8d25fd58a6 100644 --- a/tests/src/JIT/jit64/mcc/interop/native_i1c.cpp +++ b/tests/src/JIT/jit64/mcc/interop/native_i1c.cpp @@ -4,8 +4,10 @@ #include #include "native.h" +#ifdef __clang__ #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wvarargs" +#endif MCC_API VType1 __cdecl sum(float first, ...) { VType1 result; @@ -52,4 +54,6 @@ MCC_API VType1 __cdecl sum(float first, ...) { return result; } -#pragma clang diagnostic pop \ No newline at end of file +#ifdef __clang__ +#pragma clang diagnostic pop +#endif -- cgit v1.2.3