]> git.ipfire.org Git - thirdparty/kea.git/commitdiff
[3839] unused exception handler variable aka #3839
authorFrancis Dupont <fdupont@isc.org>
Tue, 12 May 2015 18:18:25 +0000 (20:18 +0200)
committerFrancis Dupont <fdupont@isc.org>
Tue, 12 May 2015 18:18:25 +0000 (20:18 +0200)
13 files changed:
src/lib/dhcp/libdhcp++.cc
src/lib/dhcp/option4_client_fqdn.cc
src/lib/dhcp/option6_client_fqdn.cc
src/lib/dhcp_ddns/ncr_msg.cc
src/lib/dhcpsrv/csv_lease_file4.cc
src/lib/dhcpsrv/csv_lease_file6.cc
src/lib/dhcpsrv/lease_file_loader.h
src/lib/dhcpsrv/logging.cc
src/lib/dhcpsrv/memfile_lease_mgr.cc
src/lib/dhcpsrv/parsers/dhcp_parsers.cc
src/lib/dns/rdata.cc
src/lib/log/tests/logger_lock_test.cc
src/lib/util/csv_file.cc

index be7095533d853a9037399d2ba556f8e973d606df..df8595aaa9c61debaaf5be580f5e47011ce61a3f 100644 (file)
@@ -746,7 +746,7 @@ void initOptionSpace(OptionDefContainer& defs,
 
         try {
             definition->validate();
-        } catch (const isc::Exception& ex) {
+        } catch (const isc::Exception&) {
             // This is unlikely event that validation fails and may
             // be only caused by programming error. To guarantee the
             // data consistency we clear all option definitions that
index 97c4bb3c5fba8a5c0bb1b3e3ebb78c796e6d1546..072c5817ee7288ee6b5eb513cd8a8a4189a8c644 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2013-2014 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -218,7 +218,7 @@ setDomainName(const std::string& domain_name,
         try {
             domain_name_.reset(new isc::dns::Name(name));
 
-        } catch (const Exception& ex) {
+        } catch (const Exception&) {
             isc_throw(InvalidOption4FqdnDomainName,
                       "invalid domain-name value '"
                       << domain_name << "' when setting new domain-name for"
index 2fadb897a83bfdeeac5b1e8d741e7018fcde453e..de2b18b31ebeee009eb10d322180a17a3bcadfbc 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2013-2014 Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2013-2015 Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -189,7 +189,7 @@ setDomainName(const std::string& domain_name,
         try {
             domain_name_.reset(new isc::dns::Name(name, true));
 
-        } catch (const Exception& ex) {
+        } catch (const Exception&) {
             isc_throw(InvalidOption6FqdnDomainName, "invalid domain-name value '"
                       << domain_name << "' when setting new domain-name for"
                       << " DHCPv6 Client FQDN Option");
@@ -249,7 +249,7 @@ Option6ClientFqdnImpl::parseWireData(OptionBufferConstIter first,
             isc::util::InputBuffer name_buf(&buf[0], buf.size());
             try {
                 domain_name_.reset(new isc::dns::Name(name_buf, true));
-            } catch (const Exception& ex) {
+            } catch (const Exception&) {
                 isc_throw(InvalidOption6FqdnDomainName, "failed to parse"
                           "partial domain-name from wire format");
             }
@@ -264,7 +264,7 @@ Option6ClientFqdnImpl::parseWireData(OptionBufferConstIter first,
                                             std::distance(first, last));
             try {
                 domain_name_.reset(new isc::dns::Name(name_buf, true));
-            } catch (const Exception& ex) {
+            } catch (const Exception&) {
                 isc_throw(InvalidOption6FqdnDomainName, "failed to parse"
                           "fully qualified domain-name from wire format");
             }
index d69fae52b2fd71bd38098b49714def8c59eaeb6a..1bd9c9e3240b567ca7303eaced67f1312ac87882 100644 (file)
@@ -506,7 +506,7 @@ NameChangeRequest::setIpAddress(const std::string& value) {
     // Validate IP Address.
     try {
         ip_io_address_ = isc::asiolink::IOAddress(value);
-    } catch (const isc::asiolink::IOError& ex) {
+    } catch (const isc::asiolink::IOError&) {
         isc_throw(NcrMessageError,
                   "Invalid ip address string for ip_address: " << value);
     }
index a812785857197d72d103c9bd4e8cb8f0dfaf222e..8ed0e82f31a632435e730bb1eabfd63bf5aa9648 100644 (file)
@@ -62,7 +62,7 @@ CSVLeaseFile4::append(const Lease4& lease) {
 
     try {
         CSVFile::append(row);
-    } catch (const std::exception& ex) {
+    } catch (const std::exception&) {
         // Catch any errors so we can bump the error counter than rethrow it
         ++write_errs_;
         throw;
index 13551a4808af9502bf0ad0f6e17f9367cde0f31a..a8c0d50c90387d290627ebf008fdacbabc890203 100644 (file)
@@ -61,7 +61,7 @@ CSVLeaseFile6::append(const Lease6& lease) {
     }
     try {
         CSVFile::append(row);
-    } catch (const std::exception& ex) {
+    } catch (const std::exception&) {
         // Catch any errors so we can bump the error counter than rethrow it
         ++write_errs_;
         throw;
index f41bf4bfcbc7a4082be98d53ac4926d7ed2698af..fa673098c3962c7f8e48e9dd31130ccf455d2688 100644 (file)
@@ -199,7 +199,7 @@ public:
              ++lease) {
             try {
                 lease_file.append(**lease);
-            } catch (const isc::Exception& ex) {
+            } catch (const isc::Exception&) {
             // Close the file
             lease_file.close();
             throw;
index b65b9b95ef062812ddbf0f326d441ad8dfb56684..7a3938c8cace367a8290b7f20d9708272cb177be 100644 (file)
@@ -76,7 +76,7 @@ void LogConfigParser::parseConfigEntry(isc::data::ConstElementPtr entry) {
     }
     try {
         info.severity_ = isc::log::getSeverity(severity_ptr->stringValue().c_str());
-    } catch (const std::exception& ex) {
+    } catch (const std::exception&) {
         isc_throw(BadValue, "Unsupported severity value '"
                   << severity_ptr->stringValue() << "' ("
                   << severity_ptr->getPosition() << ")");
index 0afb22149e292060b31fd7c8792a14b8b1e19f2c..df2591217ab6d4db0aa81845d0abdb98386a3c6f 100644 (file)
@@ -201,7 +201,7 @@ LFCSetup::execute() {
             .arg(process_->getCommandLine());
         pid_ = process_->spawn();
 
-    } catch (const ProcessSpawnError& ex) {
+    } catch (const ProcessSpawnError&) {
         LOG_ERROR(dhcpsrv_logger, DHCPSRV_MEMFILE_LFC_SPAWN_FAIL);
     }
 }
@@ -682,7 +682,7 @@ Memfile_LeaseMgr::initLeaseFilePath(Universe u) {
     std::string persist_val;
     try {
         persist_val = getParameter("persist");
-    } catch (const Exception& ex) {
+    } catch (const Exception&) {
         // If parameter persist hasn't been specified, we use a default value
         // 'yes'.
         persist_val = "true";
@@ -700,7 +700,7 @@ Memfile_LeaseMgr::initLeaseFilePath(Universe u) {
     std::string lease_file;
     try {
         lease_file = getParameter("name");
-    } catch (const Exception& ex) {
+    } catch (const Exception&) {
         lease_file = getDefaultLeaseFilePath(u);
     }
     return (lease_file);
@@ -786,14 +786,14 @@ Memfile_LeaseMgr::lfcSetup() {
     std::string lfc_interval_str = "0";
     try {
         lfc_interval_str = getParameter("lfc-interval");
-    } catch (const std::exception& ex) {
+    } catch (const std::exception&) {
         // Ignore and default to 0.
     }
 
     uint32_t lfc_interval = 0;
     try {
         lfc_interval = boost::lexical_cast<uint32_t>(lfc_interval_str);
-    } catch (boost::bad_lexical_cast& ex) {
+    } catch (boost::bad_lexical_cast&) {
         isc_throw(isc::BadValue, "invalid value of the lfc-interval "
                   << lfc_interval_str << " specified");
     }
index 6898049ce8a3d3219b010b6f639668a1fa39207d..da304d6251a77318ffa571344cf152d391f88f0f 100644 (file)
@@ -357,7 +357,7 @@ OptionDataParser::extractCode(ConstElementPtr parent) const {
     try {
         code = uint32_values_->getParam("code");
 
-    } catch (const exception& ex) {
+    } catch (const exception&) {
         // The code parameter was not found. Return an unspecified
         // value.
         return (OptionalValue<uint32_t>());
index a34f8870fe7274753b416372bcee724fba296438..f8ee61d93f15127f0230a55457ec42c1d2ce5514 100644 (file)
@@ -235,7 +235,7 @@ Generic::constructFromLexer(MasterLexer& lexer) {
 
     try {
         rdlen = lexer.getNextToken(MasterToken::NUMBER).getNumber();
-    } catch (const MasterLexer::LexerError& ex) {
+    } catch (const MasterLexer::LexerError&) {
         isc_throw(InvalidRdataLength,
                   "Unknown RDATA length is invalid");
     }
index 9b9ee1799302160273c8d0af55db76e3e20ff929..626fb0e84a5b7dc5bd35c6e79a96890ef8dd7651 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2012  Internet Systems Consortium, Inc. ("ISC")
+// Copyright (C) 2012, 2015  Internet Systems Consortium, Inc. ("ISC")
 //
 // Permission to use, copy, modify, and/or distribute this software for any
 // purpose with or without fee is hereby granted, provided that the above
@@ -40,7 +40,7 @@ protected:
         try {
             // This lock attempt is non-blocking.
             Mutex::Locker locker(LoggerManager::getMutex(), false);
-        } catch (Mutex::Locker::AlreadyLocked& e) {
+        } catch (Mutex::Locker::AlreadyLocked&) {
             cout << "FIELD1 FIELD2 LOGGER_LOCK_TEST: MUTEXLOCK\n";
         }
 
index 4f03f48d8a158fadb7ad8c0f0b4daaacf59e5a92..b65d375374806caee4d11d1567309dc038ed5f8e 100644 (file)
@@ -195,7 +195,7 @@ CSVFile::size() const {
         fs.seekg(0, std::ifstream::end);
         pos = fs.tellg();
         fs.close();
-    } catch (const std::exception& ex) {
+    } catch (const std::exception&) {
         return (0);
     }
     return (pos);
@@ -321,7 +321,7 @@ CSVFile::open(const bool seek_to_end) {
                 fs_->clear();
             }
 
-        } catch (const std::exception& ex) {
+        } catch (const std::exception&) {
             close();
             throw;
         }