From 2cd73fb9bb06d211d076ca7c9df8a3a592edd32f Mon Sep 17 00:00:00 2001 From: Arsenii es3n1n Date: Wed, 9 Oct 2024 17:19:08 +0200 Subject: [PATCH] test: explicitly discard write value --- src/tests/memory/reader.cpp | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/tests/memory/reader.cpp b/src/tests/memory/reader.cpp index d34926a..873286c 100644 --- a/src/tests/memory/reader.cpp +++ b/src/tests/memory/reader.cpp @@ -1,12 +1,13 @@ -#include #include +#include #include +#include -inline std::expected read_impl(void* buffer, const std::uintptr_t address, const std::size_t size) { +inline std::expected read_impl(void*, const std::uintptr_t, const std::size_t) { throw std::runtime_error(""); } -inline std::expected write_impl(std::uintptr_t address, const void* buffer, const std::size_t size) { +inline std::expected write_impl(std::uintptr_t, const void*, const std::size_t) { throw std::runtime_error(""); } @@ -17,6 +18,6 @@ TEST(reader, read_write_impls) { EXPECT_THROW(memory::reader.read(0x1234), std::runtime_error); EXPECT_THROW(memory::reader.write(nullptr, 0), std::runtime_error); - EXPECT_THROW(memory::address(0x1234).read(), std::runtime_error); + EXPECT_THROW(std::ignore = memory::address(0x1234).read(), std::runtime_error); EXPECT_THROW(memory::address(0x1234).write(0), std::runtime_error); }