Fix warnings in test (#92)

* Convert tabs to spaces

* Remove extra semicolons in test

* Fix warnings in test

-Wreturn-type
-Wunused-parameter
-Wunused-value

* Fix -Wunused-variable warning in test

The variable 'failptr' is unused. From looking at the other variables in the
test case, it seems the fix is to first remove 'failptr' and then rename
'efail' to 'failptr'.

* Fix -Wunused-variable warning in test

* Fix -Wmacro-redefined warning in test

STATIC_REQUIRE has a previous definition in catch2/catch.hpp.
This commit is contained in:
Simon Truscott authored and GitHub committed 2022-11-24 13:18:39 +00:00
1 parent cd8c7920b3
commit 2675ce3cd4
4 files changed
+21 -20

No files matched your search

+3 -3
View File
@@ -825,7 +825,7 @@ struct expected_operations_base : expected_storage_base<T, E> {
if (rhs.m_has_val) {
get() = std::forward<Rhs>(rhs).get();
} else {
destroy_val();
destroy_val();
construct_error(std::forward<Rhs>(rhs).geterr());
}
} else {
@@ -858,7 +858,7 @@ struct expected_operations_base : expected_storage_base<T, E> {
#endif
TL_EXPECTED_11_CONSTEXPR void destroy_val() {
get().~T();
get().~T();
}
};
@@ -913,7 +913,7 @@ struct expected_operations_base<void, E> : expected_storage_base<void, E> {
#endif
TL_EXPECTED_11_CONSTEXPR void destroy_val() {
//no-op
//no-op
}
};