From 88a82da1c6388af0ef0f0baa5bf898bbe961f99c Mon Sep 17 00:00:00 2001 From: David Poole Date: Thu, 4 Jul 2024 09:45:23 -0700 Subject: [PATCH] https://github.com/jsonrpcx/json-rpc-cxx/issues/46 capture (but ignore) the return from std::to_string() to fix warning-as-error ignoring a [[nodiscard]] --- test/server.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/server.cpp b/test/server.cpp index d29eac4..f80de50 100644 --- a/test/server.cpp +++ b/test/server.cpp @@ -95,7 +95,7 @@ class TestServer { }; void dirty_notification() { throw std::exception(); } - int dirty_method(int a, int b) { to_string(a+b); throw std::exception(); } + int dirty_method(int a, int b) { auto _ = to_string(a+b); throw std::exception(); } int dirty_method2(int a, int b) { throw (a+b); } string param_proc;