MSVC static code analysis warnings
catch.hpp(11784): warning C26439: This kind of function may not throw. Declare it 'noexcept' (f.6).
catch.hpp(4405): warning C26495: Variable 'Catch::Option
Platform information:
- OS: Windows 10 (1909) / Windows Server 2016 (1607)
- Compiler+version: MSVC 14.26.28801 (VS2019 version 16.6.1)
- Catch v2.12.2
We are currently disabling warnings like this:
#ifdef _MSC_VER // hutch: 09/17/2020. manually added pending resolution of https://github.com/catchorg/Catch2/issues/1955
#pragma warning(push)
#pragma warning(disable: 26415 26418 26439 26495)
#endif
...
#ifdef _MSC_VER // hutch: 09/17/2020. manually added pending resolution of https://github.com/catchorg/Catch2/issues/1955
#pragma warning(pop)
#endif
Should this issue be closed?
I'll try to verify tomorrow that this issue has been fixed when running the latest Catch2 and VS2019 version 16.11.3. But I have no reason to think they have been fixed.
This has still not been fixed in Catch v2.13.8, so please leave it open.
I am also seeing rather many warnings with catch 2.13.8:
Is there any workaround known to disable these in Visual Studio?