From b3c5e11f16f26d6aeea0fd47e45032d2788b571f Mon Sep 17 00:00:00 2001 From: Andrey Semashev Date: Tue, 7 Feb 2023 13:39:11 +0300 Subject: [PATCH] Silenced clang warnings about unused to_string function. --- test/path_test.cpp | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/test/path_test.cpp b/test/path_test.cpp index be0f74b..8067d60 100644 --- a/test/path_test.cpp +++ b/test/path_test.cpp @@ -187,6 +187,12 @@ typedef basic_custom_string< char > custom_string; typedef basic_custom_string< wchar_t > wcustom_string; typedef basic_custom_string< fs::path::value_type > pcustom_string; +#if defined(__clang__) +#pragma clang diagnostic push +// unused function 'to_string' +#pragma clang diagnostic ignored "-Wunused-function" +#endif // defined(__clang__) + inline std::string const& to_string(std::string const& s) { return s; @@ -197,6 +203,10 @@ inline std::string to_string(fs::path const& p) return p.string(); } +#if defined(__clang__) +#pragma clang diagnostic pop +#endif // defined(__clang__) + std::string platform(BOOST_PLATFORM); void check(const fs::path& source, const std::string& expected, const char* file, int line)