Repository :
https://github.com/FarGroup/FarManager
On branch : master
Link :
https://github.com/FarGroup/FarManager/commit/dfa8500fddd338b37e4c4ab2dc5539c73d5065f7
>---------------------------------------------------------------
commit dfa8500fddd338b37e4c4ab2dc5539c73d5065f7
Author: Alex Alabuzhev <
alab...@gmail.com>
Date: Sun Aug 31 15:55:42 2025 +0100
Suppress more Clang warnings
>---------------------------------------------------------------
dfa8500fddd338b37e4c4ab2dc5539c73d5065f7
far/exception_handler_test.cpp | 19 +++++++++++++++----
far/platform.fs.cpp | 3 +++
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/far/exception_handler_test.cpp b/far/exception_handler_test.cpp
index 042c5c427..e071544b0 100644
--- a/far/exception_handler_test.cpp
+++ b/far/exception_handler_test.cpp
@@ -106,7 +106,9 @@ namespace tests
cpp_try(
[]
{
- throw std::runtime_error("Test nested std error"s);
+ // TODO: remove and mark the lambda as [[noreturn]] once we have cl >= 19.44 (VS2022 17.14)
+ if ([[maybe_unused]] volatile auto Throw = true)
+ throw std::runtime_error("Test nested std error"s);
},
save_exception_to(Ptr)
);
@@ -126,7 +128,9 @@ namespace tests
cpp_try(
[]
{
- throw std::runtime_error("Test nested std error (thread)"s);
+ // TODO: remove and mark the lambda as [[noreturn]] once we have cl >= 19.44 (VS2022 17.14)
+ if ([[maybe_unused]] volatile auto Throw = true)
+ throw std::runtime_error("Test nested std error (thread)"s);
},
save_exception_to(Ptr)
);
@@ -166,7 +170,9 @@ namespace tests
cpp_try(
[]
{
- throw 69u;
+ // TODO: remove and mark the lambda as [[noreturn]] once we have cl >= 19.44 (VS2022 17.14)
+ if ([[maybe_unused]] volatile auto Throw = true)
+ throw 69u;
},
save_exception_to(Ptr)
);
@@ -211,7 +217,12 @@ namespace tests
{
try
{
- const auto do_throw = []{ throw far_exception(L"throw from a noexcept function"); };
+ const auto do_throw = []
+ {
+ // TODO: remove and mark the lambda as [[noreturn]] once we have cl >= 19.44 (VS2022 17.14)
+ if ([[maybe_unused]] volatile auto Throw = true)
+ throw far_exception(L"throw from a noexcept function");
+ };
[&]() noexcept
{
diff --git a/far/platform.fs.cpp b/far/platform.fs.cpp
index 8b181c08d..45d68e8a5 100644
--- a/far/platform.fs.cpp
+++ b/far/platform.fs.cpp
@@ -1435,7 +1435,10 @@ namespace os::fs
return seekoff(Pos, std::ios::beg, Which);
}
+WARNING_PUSH()
+WARNING_DISABLE_CLANG("-Wmissing-noreturn")
filebuf::int_type filebuf::pbackfail(int_type Ch)
+WARNING_POP()
{
throw far_fatal_exception(L"Not implemented"sv);
}