Commit 0213d987 authored by Stephen Morris's avatar Stephen Morris
Browse files

[1470] Removed declared but unused exception variable

This leads to a warning on some compiler.
parent 62463d1d
......@@ -276,7 +276,7 @@ TCPSocket<C>::asyncSend(const void* data, size_t length,
// ... and send it
socket_.async_send(asio::buffer(send_buffer_->getData(),
send_buffer_->getLength()), callback);
} catch (boost::numeric::bad_numeric_cast& e) {
} catch (boost::numeric::bad_numeric_cast&) {
isc_throw(BufferTooLarge,
"attempt to send buffer larger than 64kB");
}
......
......@@ -103,7 +103,7 @@ loadQueryData(istream& input, BenchQueries& queries, const RRClass& qclass,
static_cast<const unsigned char*>(buffer.getData()) +
buffer.getLength());
queries.push_back(query_data);
} catch (const Exception& error) {
} catch (const Exception&) {
if (strict) {
isc_throw(BenchMarkError,
"failed to parse/create query around line " <<
......
......@@ -742,7 +742,7 @@ MapElement::find(const std::string& id, ConstElementPtr t) const {
t = p;
return (true);
}
} catch (const TypeError& e) {
} catch (const TypeError&) {
// ignore
}
return (false);
......
......@@ -139,7 +139,7 @@ LibDHCP::packOptions6(boost::shared_array<uint8_t> data,
offset = it->second->pack(data, data_len, offset);
}
}
catch (const Exception& e) {
catch (const Exception&) {
cout << "Packet build failed (Option build failed)." << endl;
throw;
}
......
......@@ -237,10 +237,10 @@ logConfigUpdate(PyObject*, PyObject* args) {
} catch (const isc::data::JSONError& je) {
std::string error_msg = std::string("JSON format error: ") + je.what();
PyErr_SetString(PyExc_TypeError, error_msg.c_str());
} catch (const isc::data::TypeError& de) {
} catch (const isc::data::TypeError&) {
PyErr_SetString(PyExc_TypeError, "argument 1 of log_config_update "
"is not a map of config data");
} catch (const isc::config::ModuleSpecError& mse) {
} catch (const isc::config::ModuleSpecError&) {
PyErr_SetString(PyExc_TypeError, "argument 2 of log_config_update "
"is not a correct module specification");
} catch (const std::exception& e) {
......
......@@ -59,7 +59,7 @@ parseAddresses(isc::data::ConstElementPtr addresses,
result.push_back(AddressPair(addr->stringValue(),
port->intValue()));
}
catch (const TypeError &e) { // Better error message
catch (const TypeError&) { // Better error message
LOG_ERROR(logger, SRVCOMM_ADDRESS_TYPE).
arg(addrPair->str());
isc_throw(TypeError,
......
......@@ -191,7 +191,7 @@ tokenToNum(const std::string& num_token) {
NumType num;
try {
num = boost::lexical_cast<NumType>(num_token);
} catch (const boost::bad_lexical_cast& ex) {
} catch (const boost::bad_lexical_cast&) {
isc_throw(StringTokenError, "Invalid SRV numeric parameter: " <<
num_token);
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment