diff --git a/UnitTest/UnitTest.vcxproj b/UnitTest/UnitTest.vcxproj index d98ea5b10..4040374a2 100644 --- a/UnitTest/UnitTest.vcxproj +++ b/UnitTest/UnitTest.vcxproj @@ -55,7 +55,7 @@ Use - Level3 + Level4 true $(SolutionDir);$(SolutionDir)six\modules\c++\scene\include;$(SolutionDir)six\modules\c++\six\include;$(SolutionDir)six\modules\c++\six.sidd\include;$(SolutionDir)six\modules\c++\six.sicd\include;$(SolutionDir)six\modules\c++\cphd\include;$(SolutionDir)six\modules\c++\cphd03\include;$(SolutionDir)externals\nitro\modules\c\nrt\include;$(SolutionDir)externals\nitro\modules\c\nitf\include;$(SolutionDir)externals\nitro\modules\c++\nitf\include;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration)\include;$(SolutionDir)externals\coda-oss\out\install\$(Platform)-$(Configuration);$(SolutionDir)out\install\$(Platform)-$(Configuration)\include;$(SolutionDir)out\install\$(Platform)-$(Configuration);$(VCInstallDir)UnitTest\include;%(AdditionalIncludeDirectories) _DEBUG;SIX_DEFAULT_SCHEMA_PATH=R"($(SolutionDir)install-$(Configuration)-$(Platform).$(PlatformToolset)\conf\schema\six)";%(PreprocessorDefinitions);_SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING diff --git a/six/modules/c++/CMakeLists.txt b/six/modules/c++/CMakeLists.txt index 44914c170..6ec59c7bb 100644 --- a/six/modules/c++/CMakeLists.txt +++ b/six/modules/c++/CMakeLists.txt @@ -2,8 +2,11 @@ if (MSVC) # By default, there is a /W3 on the command-line from somewhere (?); adding # /Wn results in a compiler warning. - #add_compile_options(/W4) # /Wall - string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # /Wall + # + # https://github.com/microsoft/STL/wiki/Changelog#vs-2022-179-preview-1 + # > *Note*: `/Wall` is not intended for regular production use, as it contains a large number of + # > extremely noisy and low-value warnings. In general, the STL does not attempt to be `/Wall` clean. + string(REGEX REPLACE "/W[0-4]" "/W4" CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}") # add_compile_options(/W4) add_compile_options(/wd4996) # '...': This function or variable may be unsafe. Consider using sprintf_s instead. To disable deprecation, use _CRT_SECURE_NO_WARNINGS. See online help for details. add_compile_options(/wd4127) # conditional expression is constant diff --git a/six/modules/c++/cphd/cphd.vcxproj b/six/modules/c++/cphd/cphd.vcxproj index 45aaa5e6a..1da9449ef 100644 --- a/six/modules/c++/cphd/cphd.vcxproj +++ b/six/modules/c++/cphd/cphd.vcxproj @@ -62,7 +62,7 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 true MultiThreadedDebugDLL true diff --git a/six/modules/c++/cphd03/cphd03.vcxproj b/six/modules/c++/cphd03/cphd03.vcxproj index 129e15915..baffbf33a 100644 --- a/six/modules/c++/cphd03/cphd03.vcxproj +++ b/six/modules/c++/cphd03/cphd03.vcxproj @@ -62,7 +62,7 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 true MultiThreadedDebugDLL true diff --git a/six/modules/c++/samples/check_valid_six.dir/check_valid_six.vcxproj b/six/modules/c++/samples/check_valid_six.dir/check_valid_six.vcxproj index eb0e48d06..dedfd0d89 100644 --- a/six/modules/c++/samples/check_valid_six.dir/check_valid_six.vcxproj +++ b/six/modules/c++/samples/check_valid_six.dir/check_valid_six.vcxproj @@ -61,7 +61,7 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 true MultiThreadedDebugDLL true diff --git a/six/modules/c++/samples/crop_sicd.dir/crop_sicd.vcxproj b/six/modules/c++/samples/crop_sicd.dir/crop_sicd.vcxproj index 5b8ed9267..baae7870b 100644 --- a/six/modules/c++/samples/crop_sicd.dir/crop_sicd.vcxproj +++ b/six/modules/c++/samples/crop_sicd.dir/crop_sicd.vcxproj @@ -61,7 +61,7 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 true MultiThreadedDebugDLL true diff --git a/six/modules/c++/scene/scene.vcxproj b/six/modules/c++/scene/scene.vcxproj index 62eb7adb3..cf3a27e0a 100644 --- a/six/modules/c++/scene/scene.vcxproj +++ b/six/modules/c++/scene/scene.vcxproj @@ -63,7 +63,7 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 true true MultiThreadedDebugDLL diff --git a/six/modules/c++/six.convert/six.convert.vcxproj b/six/modules/c++/six.convert/six.convert.vcxproj index f67abbbe4..fa7aa68e4 100644 --- a/six/modules/c++/six.convert/six.convert.vcxproj +++ b/six/modules/c++/six.convert/six.convert.vcxproj @@ -62,7 +62,7 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 true MultiThreadedDebugDLL true diff --git a/six/modules/c++/six.sicd/six.sicd.vcxproj b/six/modules/c++/six.sicd/six.sicd.vcxproj index d96c1fae4..d95b9eda8 100644 --- a/six/modules/c++/six.sicd/six.sicd.vcxproj +++ b/six/modules/c++/six.sicd/six.sicd.vcxproj @@ -63,9 +63,10 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 MultiThreadedDebugDLL true + true diff --git a/six/modules/c++/six.sicd/source/ComplexToAMP8IPHS8I.cpp b/six/modules/c++/six.sicd/source/ComplexToAMP8IPHS8I.cpp index d799b3c5f..e34bb9117 100644 --- a/six/modules/c++/six.sicd/source/ComplexToAMP8IPHS8I.cpp +++ b/six/modules/c++/six.sicd/source/ComplexToAMP8IPHS8I.cpp @@ -143,7 +143,7 @@ six::sicd::details::ComplexToAMP8IPHS8I::ComplexToAMP8IPHS8I(const six::Amplitud const auto p1 = GetPhase(Utilities::toComplex(1, 1, pAmplitudeTable)); assert(p0 == 0.0); assert(p1 > p0); - phase_delta = p1 - p0; + phase_delta = gsl::narrow_cast(p1 - p0); size_t i = 0; for(const auto value : six::sicd::Utilities::iota_0_256()) { diff --git a/six/modules/c++/six.sicd/source/Utilities.cpp b/six/modules/c++/six.sicd/source/Utilities.cpp index 99377c227..42dccbee2 100644 --- a/six/modules/c++/six.sicd/source/Utilities.cpp +++ b/six/modules/c++/six.sicd/source/Utilities.cpp @@ -97,7 +97,7 @@ static auto toComplex_(double A, uint8_t phase) const auto angle = units::Radians{ 2 * std::numbers::pi * P }; double sin_angle, cos_angle; SinCos(angle, sin_angle, cos_angle); - six::zfloat S(A * cos_angle, A * sin_angle); + six::zfloat S(gsl::narrow_cast(A * cos_angle), gsl::narrow_cast(A * sin_angle)); return S; } six::zfloat six::sicd::Utilities::toComplex(uint8_t amplitude, uint8_t phase) diff --git a/six/modules/c++/six.sidd/six.sidd.vcxproj b/six/modules/c++/six.sidd/six.sidd.vcxproj index 4b4e5856b..8ad2eb70a 100644 --- a/six/modules/c++/six.sidd/six.sidd.vcxproj +++ b/six/modules/c++/six.sidd/six.sidd.vcxproj @@ -63,7 +63,7 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 true MultiThreadedDebugDLL true diff --git a/six/modules/c++/six/six.vcxproj b/six/modules/c++/six/six.vcxproj index 5523252eb..6c40967ea 100644 --- a/six/modules/c++/six/six.vcxproj +++ b/six/modules/c++/six/six.vcxproj @@ -62,7 +62,7 @@ AdvancedVectorExtensions2 ProgramDatabase Guard - EnableAllWarnings + Level4 true true true