Skip to content

Commit d80c759

Browse files
authored
Merge pull request #3 from steinwurf/fix-warnings-unittest
Silence warnings about unused variables in the tests
2 parents e3d8fcb + 76dcc46 commit d80c759

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

tests/constructors.cpp

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,9 @@ TEST_CASE("Constructors", "[constructors]") {
1010
tl::function_ref<void(void)> fr1 = []{};
1111
tl::function_ref<void(void)> fr2 = foo;
1212
tl::function_ref<void(bar)> fr3 = &bar::baz;
13+
14+
// Silence warnings
15+
(void)fr1;
16+
(void)fr2;
17+
(void)fr3;
1318
}

tests/issues.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
#include "function_ref.hpp"
33

44
TEST_CASE("Issue #2") {
5-
const auto lam = [](int x) {};
5+
const auto lam = [](int ) {};
66
tl::function_ref<void(int)> ref = lam;
7+
(void)ref;
78
}

0 commit comments

Comments
 (0)