]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
fix: Devmode unused function warnings on new MSVC (#1342)
authorRafael Kitover <rkitover@gmail.com>
Sun, 29 Oct 2023 08:33:09 +0000 (08:33 +0000)
committerGitHub <noreply@github.com>
Sun, 29 Oct 2023 08:33:09 +0000 (09:33 +0100)
MSVC apparently has overrides for the two definitions of operator== in
unittest/test_util_string.cpp in the <utility> header, raising a warning
about them being local unused functions:

https://learn.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-4-c4505?view=msvc-170

Disable this warning type in cmake/DevModeWarnings.cmake for MSVC.

Signed-off-by: Rafael Kitover <rkitover@gmail.com>
cmake/DevModeWarnings.cmake

index 1db8135fe901940d496c8f43506f20fbcad5d3c8..c17d4e29c47bd006fc4b869c49ac9fbddd9b795d 100644 (file)
@@ -121,5 +121,7 @@ elseif(MSVC)
     /wd4706
     # Non-underscore-prefixed POSIX functions:
     /wd4996
+    # Dead local functions overridden by headers:
+    /wd4505
   )
 endif()