Skip to content

Commit 4c0fb80

Browse files
treat unused parameter as error
Signed-off-by: romintomasetti <romin.tomasetti@gmail.com>
1 parent e5dbe49 commit 4c0fb80

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

CMakeLists.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -226,7 +226,7 @@ add_library(stdexec_executable_flags INTERFACE)
226226

227227
# Enable warnings
228228
target_compile_options(stdexec_executable_flags INTERFACE
229-
$<$<STREQUAL:${stdexec_compiler_frontend},GNU>:-Wall>
229+
$<$<STREQUAL:${stdexec_compiler_frontend},GNU>:-Wall;-Werror=unused-parameter>
230230
$<$<STREQUAL:${stdexec_compiler_frontend},AppleClang>:-Wall>
231231
$<$<STREQUAL:${stdexec_compiler_frontend},MSVC>:/W4>)
232232

include/stdexec/__detail/__submit.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,7 +135,7 @@ namespace stdexec {
135135
: __result_(connect(static_cast<_Sender&&>(__sndr), static_cast<_Receiver&&>(__rcvr))) {
136136
}
137137

138-
void submit(_Sender&& __sndr, _Receiver&&) noexcept {
138+
void submit(_Sender&&, _Receiver&&) noexcept {
139139
stdexec::start(__result_);
140140
}
141141

test/exec/test_repeat_effect_until.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -168,7 +168,7 @@ namespace {
168168
const auto tid = std::this_thread::get_id();
169169
bool called{false};
170170
ex::sender auto snd = stdexec::on(
171-
pool.get_scheduler(), ex::just() | ex::bulk(ex::par_unseq, 1024, [&](int index) noexcept {
171+
pool.get_scheduler(), ex::just() | ex::bulk(ex::par_unseq, 1024, [&](int) noexcept {
172172
if (tid == std::this_thread::get_id()) {
173173
failed = true;
174174
}

test/exec/test_task.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,7 @@ namespace {
259259

260260
struct test_domain {
261261
template <sender_expr_for<then_t> _Sender>
262-
static constexpr auto transform_sender(_Sender&& __sndr) noexcept {
262+
static constexpr auto transform_sender(_Sender&&) noexcept {
263263
return just("goodbye"s);
264264
}
265265
};

test/test_common/senders.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ namespace {
3636
};
3737

3838
template <class Receiver>
39-
auto connect(Receiver rcvr) const noexcept {
39+
auto connect(Receiver) const noexcept {
4040
return operation{};
4141
}
4242
};

0 commit comments

Comments
 (0)