Skip to content

Commit

Permalink
COMP: Fix unused macros related to MSVC and OS
Browse files Browse the repository at this point in the history
This is to fix the -Wunused-macros generated by clang for macros related to MSVC and Microsoft.

For itkNumericTraitsTest.cxx, the _MSC_VER is added to respect the comment.

For itkTestDriver.cxx, ITK_TEST_DRIVER_PATH_SLASH / is related to non Windows machine and there is none in the code and hence it is removed. Now, for ITK_TEST_DRIVER_PATH_SLASH \\, it is not found in the entire code. This is the reason why it is removed.
  • Loading branch information
andrei-sandor authored and hjmjohnson committed May 31, 2024
1 parent d5a7a1d commit b6ab07f
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 3 additions & 1 deletion Modules/Core/Common/test/itkNumericTraitsTest.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,11 @@
*=========================================================================*/

#if !defined(ITK_LEGACY_REMOVE)
# ifdef _MSC_VER
// Suppress MSVC warnings from VS2022, saying: "warning C4996: 'std::complex<T>::complex': warning STL4037: The effect
// of instantiating the template std::complex for any type other than float, double, or long double is unspecified."
# define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING
# define _SILENCE_NONFLOATING_COMPLEX_DEPRECATION_WARNING
# endif
#endif

#include <iostream>
Expand Down
2 changes: 0 additions & 2 deletions Modules/Core/TestKernel/src/itkTestDriver.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -84,10 +84,8 @@

#if defined(_WIN32) && !defined(__CYGWIN__)
# define ITK_TEST_DRIVER_PATH_SEP ';'
# define ITK_TEST_DRIVER_PATH_SLASH '\\'
#else
# define ITK_TEST_DRIVER_PATH_SEP ':'
# define ITK_TEST_DRIVER_PATH_SLASH '/'
#endif


Expand Down

0 comments on commit b6ab07f

Please sign in to comment.