diff options
Diffstat (limited to 'libcxx/test/std/diagnostics/syserr')
2 files changed, 7 insertions, 5 deletions
diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp index a2515a4c835..6c76a25526f 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcode/syserr.errcode.overview/types.pass.cpp @@ -13,11 +13,12 @@ // Make sure that the error_code bits of <system_error> are self-contained. #include <system_error> +#include "test_macros.h" int main() { std::error_code x; - (void) x.category(); // returns a std::error_category & - (void) x.default_error_condition(); // std::error_condition - (void) x.message(); // returns a std::string + TEST_IGNORE_NODISCARD x.category(); // returns a std::error_category & + TEST_IGNORE_NODISCARD x.default_error_condition(); // std::error_condition + TEST_IGNORE_NODISCARD x.message(); // returns a std::string } diff --git a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp index 5bbca295f6b..62539ab3ee6 100644 --- a/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp +++ b/libcxx/test/std/diagnostics/syserr/syserr.errcondition/syserr.errcondition.overview/types.pass.cpp @@ -13,10 +13,11 @@ // Make sure that the error_condition bits of <system_error> are self-contained. #include <system_error> +#include "test_macros.h" int main() { std::error_condition x = std::errc(0); - (void) x.category(); // returns a std::error_condition & - (void) x.message(); // returns a std::string + TEST_IGNORE_NODISCARD x.category(); // returns a std::error_condition & + TEST_IGNORE_NODISCARD x.message(); // returns a std::string } |

