Skip to content

Commit 6a065dd

Browse files
authored
Merge pull request #135 from KingDuckZ/master
Fix warnings about unused parameters.
2 parents 0c34207 + 7bffec3 commit 6a065dd

11 files changed

Lines changed: 16 additions & 16 deletions

File tree

include/rapidcheck/Show.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -191,7 +191,7 @@ template <typename T,
191191
bool = HasShowValue<T>::value,
192192
bool = IsStreamInsertible<T>::value>
193193
struct ShowDefault {
194-
static void show(const T &value, std::ostream &os) { os << "<\?\?\?>"; }
194+
static void show(const T &/*value*/, std::ostream &os) { os << "<\?\?\?>"; }
195195
};
196196

197197
template <typename T, bool X>

include/rapidcheck/detail/BitStream.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ T BitStream<Source>::next(int nbits) {
3232

3333
template <typename Source>
3434
template <typename T>
35-
T BitStream<Source>::next(int nbits, std::true_type) {
35+
T BitStream<Source>::next(int /*nbits*/, std::true_type) {
3636
return next<unsigned int>(1) != 0;
3737
}
3838

include/rapidcheck/detail/ShowType.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ struct ShowMultipleTypes;
2222

2323
template <>
2424
struct ShowMultipleTypes<> {
25-
static void showType(std::ostream &os) {}
25+
static void showType(std::ostream &/*os*/) {}
2626
};
2727

2828
template <typename Type>

include/rapidcheck/detail/TestListenerAdapter.h

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,9 @@ namespace detail {
88
/// `TestListener` that has no-op default implementations of all methods.
99
class TestListenerAdapter : public TestListener {
1010
public:
11-
void onTestCaseFinished(const CaseDescription &description) {}
12-
void onShrinkTried(const CaseDescription &shrink, bool accepted) {}
13-
void onTestFinished(const TestMetadata &metadata, const TestResult &result) {}
11+
void onTestCaseFinished(const CaseDescription &/*description*/) {}
12+
void onShrinkTried(const CaseDescription &/*shrink*/, bool /*accepted*/) {}
13+
void onTestFinished(const TestMetadata &/*metadata*/, const TestResult &/*result*/) {}
1414
};
1515

1616
} // namespace detail

include/rapidcheck/detail/Utility.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ void pushBackAll(Collection &collection, Item &&item, Items &&... items) {
4242
}
4343

4444
/// Base case for `join`.
45-
inline std::string join(const std::string &sep, const std::string str) {
45+
inline std::string join(const std::string &/*sep*/, const std::string str) {
4646
return str;
4747
}
4848

include/rapidcheck/fn/Common.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ class Constant {
1313
: m_value(std::forward<Arg>(arg)) {}
1414

1515
template <typename... Args>
16-
T operator()(Args &&... args) const {
16+
T operator()(Args &&... /*args*/) const {
1717
return m_value;
1818
}
1919

include/rapidcheck/gen/Tuple.hpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ class TupleGen<rc::detail::IndexSequence<Indexes...>, Ts...> {
112112
template <>
113113
class TupleGen<rc::detail::IndexSequence<>> {
114114
public:
115-
Shrinkable<std::tuple<>> operator()(const Random &random, int size) const {
115+
Shrinkable<std::tuple<>> operator()(const Random &/*random*/, int /*size*/) const {
116116
return shrinkable::just(std::tuple<>());
117117
}
118118
};

src/detail/LogTestListener.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ void LogTestListener::onTestCaseFinished(const CaseDescription &description) {
3131
}
3232
}
3333

34-
void LogTestListener::onShrinkTried(const CaseDescription &shrink,
34+
void LogTestListener::onShrinkTried(const CaseDescription &/*shrink*/,
3535
bool accepted) {
3636
if (!m_verboseShrinking) {
3737
return;
@@ -44,8 +44,8 @@ void LogTestListener::onShrinkTried(const CaseDescription &shrink,
4444
}
4545
}
4646

47-
void LogTestListener::onTestFinished(const TestMetadata &metadata,
48-
const TestResult &result) {
47+
void LogTestListener::onTestFinished(const TestMetadata &/*metadata*/,
48+
const TestResult &/*result*/) {
4949
if (m_verboseShrinking || m_verboseProgress) {
5050
m_out << std::endl;
5151
}

src/detail/PropertyContext.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ namespace {
77

88
class DummyPropertyContext : public PropertyContext {
99
public:
10-
bool reportResult(const CaseResult &result) override { return false; }
10+
bool reportResult(const CaseResult &/*result*/) override { return false; }
1111
std::ostream &logStream() override { return std::cerr; }
12-
void addTag(std::string str) override {}
12+
void addTag(std::string /*str*/) override {}
1313
};
1414

1515
} // namespace

src/gen/Numeric.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ integral<unsigned long long>(const Random &random, int size);
2424
template Shrinkable<float> real<float>(const Random &random, int size);
2525
template Shrinkable<double> real<double>(const Random &random, int size);
2626

27-
Shrinkable<bool> boolean(const Random &random, int size) {
27+
Shrinkable<bool> boolean(const Random &random, int /*size*/) {
2828
return shrinkable::shrinkRecur(rc::detail::bitStreamOf(random).next<bool>(),
2929
&shrink::boolean);
3030
}

0 commit comments

Comments
 (0)