Suppress some additional warnings for VS 2019 (16.7) Preview
This commit is contained in:
parent
1000c63840
commit
09fc5fe957
@ -152,7 +152,7 @@ if ( CMAKE_CXX_COMPILER_ID MATCHES "MSVC" )
|
|||||||
target_compile_options(texconv PRIVATE /openmp /Zc:twoPhase-)
|
target_compile_options(texconv PRIVATE /openmp /Zc:twoPhase-)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
set(WarningsEXE "/wd4061" "/wd4062" "/wd4365" "/wd4668" "/wd4710" "/wd4820" "/wd5039" "/wd5045")
|
set(WarningsEXE "/wd4061" "/wd4062" "/wd4365" "/wd4668" "/wd4710" "/wd4820" "/wd5039" "/wd5045" "/wd5219")
|
||||||
target_compile_options(texassemble PRIVATE ${WarningsEXE})
|
target_compile_options(texassemble PRIVATE ${WarningsEXE})
|
||||||
target_compile_options(texconv PRIVATE ${WarningsEXE})
|
target_compile_options(texconv PRIVATE ${WarningsEXE})
|
||||||
target_compile_options(texdiag PRIVATE ${WarningsEXE})
|
target_compile_options(texdiag PRIVATE ${WarningsEXE})
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
{
|
{
|
||||||
"configurations": [
|
"configurations": [
|
||||||
{
|
{
|
||||||
"name": "x86-Clang-Debug",
|
"name": "x86-Clang-Debug",
|
||||||
@ -47,6 +47,18 @@
|
|||||||
"ctestCommandArgs": "",
|
"ctestCommandArgs": "",
|
||||||
"inheritEnvironments": [ "clang_cl_x64" ],
|
"inheritEnvironments": [ "clang_cl_x64" ],
|
||||||
"variables": []
|
"variables": []
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"name": "x64-Debug",
|
||||||
|
"generator": "Ninja",
|
||||||
|
"configurationType": "Debug",
|
||||||
|
"buildRoot": "${projectDir}\\out\\build\\${name}",
|
||||||
|
"installRoot": "${projectDir}\\out\\install\\${name}",
|
||||||
|
"cmakeCommandArgs": "",
|
||||||
|
"buildCommandArgs": "-v",
|
||||||
|
"ctestCommandArgs": "",
|
||||||
|
"inheritEnvironments": [ "msvc_x64_x64" ],
|
||||||
|
"variables": []
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
}
|
}
|
@ -47,11 +47,11 @@ namespace
|
|||||||
float DecodeFromIndex(size_t uIndex) const noexcept
|
float DecodeFromIndex(size_t uIndex) const noexcept
|
||||||
{
|
{
|
||||||
if (uIndex == 0)
|
if (uIndex == 0)
|
||||||
return red_0 / 255.0f;
|
return float(red_0) / 255.0f;
|
||||||
if (uIndex == 1)
|
if (uIndex == 1)
|
||||||
return red_1 / 255.0f;
|
return float(red_1) / 255.0f;
|
||||||
float fred_0 = red_0 / 255.0f;
|
float fred_0 = float(red_0) / 255.0f;
|
||||||
float fred_1 = red_1 / 255.0f;
|
float fred_1 = float(red_1) / 255.0f;
|
||||||
if (red_0 > red_1)
|
if (red_0 > red_1)
|
||||||
{
|
{
|
||||||
uIndex -= 1;
|
uIndex -= 1;
|
||||||
@ -106,11 +106,11 @@ namespace
|
|||||||
int8_t sred_1 = (red_1 == -128) ? -127 : red_1;
|
int8_t sred_1 = (red_1 == -128) ? -127 : red_1;
|
||||||
|
|
||||||
if (uIndex == 0)
|
if (uIndex == 0)
|
||||||
return sred_0 / 127.0f;
|
return float(sred_0) / 127.0f;
|
||||||
if (uIndex == 1)
|
if (uIndex == 1)
|
||||||
return sred_1 / 127.0f;
|
return float(sred_1) / 127.0f;
|
||||||
float fred_0 = sred_0 / 127.0f;
|
float fred_0 = float(sred_0) / 127.0f;
|
||||||
float fred_1 = sred_1 / 127.0f;
|
float fred_1 = float(sred_1) / 127.0f;
|
||||||
if (red_0 > red_1)
|
if (red_0 > red_1)
|
||||||
{
|
{
|
||||||
uIndex -= 1;
|
uIndex -= 1;
|
||||||
|
@ -12,7 +12,7 @@
|
|||||||
#pragma once
|
#pragma once
|
||||||
|
|
||||||
// Off by default warnings
|
// Off by default warnings
|
||||||
#pragma warning(disable : 4619 4616 4061 4265 4365 4571 4623 4625 4626 4628 4668 4710 4711 4746 4774 4820 4987 5026 5027 5031 5032 5039 5045 26812)
|
#pragma warning(disable : 4619 4616 4061 4265 4365 4571 4623 4625 4626 4628 4668 4710 4711 4746 4774 4820 4987 5026 5027 5031 5032 5039 5045 5219 26812)
|
||||||
// C4619/4616 #pragma warning warnings
|
// C4619/4616 #pragma warning warnings
|
||||||
// C4061 enumerator 'X' in switch of enum 'X' is not explicitly handled by a case label
|
// C4061 enumerator 'X' in switch of enum 'X' is not explicitly handled by a case label
|
||||||
// C4265 class has virtual functions, but destructor is not virtual
|
// C4265 class has virtual functions, but destructor is not virtual
|
||||||
@ -34,6 +34,7 @@
|
|||||||
// C5031/5032 push/pop mismatches in windows headers
|
// C5031/5032 push/pop mismatches in windows headers
|
||||||
// C5039 pointer or reference to potentially throwing function passed to extern C function under - EHc
|
// C5039 pointer or reference to potentially throwing function passed to extern C function under - EHc
|
||||||
// C5045 Spectre mitigation warning
|
// C5045 Spectre mitigation warning
|
||||||
|
// C5219 implicit conversion from 'int' to 'float', possible loss of data
|
||||||
// 26812: The enum type 'x' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
|
// 26812: The enum type 'x' is unscoped. Prefer 'enum class' over 'enum' (Enum.3).
|
||||||
|
|
||||||
// Windows 8.1 SDK related Off by default warnings
|
// Windows 8.1 SDK related Off by default warnings
|
||||||
|
Loading…
Reference in New Issue
Block a user