diff options
author | Jack Lloyd <[email protected]> | 2015-12-26 22:08:02 -0500 |
---|---|---|
committer | Jack Lloyd <[email protected]> | 2015-12-26 22:08:02 -0500 |
commit | fce8f2149757b6b234d89685e58db79ade27040a (patch) | |
tree | 8d718cc72ef23cdcf8d9f6a156ed3b61d1879e63 /src/lib | |
parent | c2515f7b098a5569cb97a134ffa83fc475cac07c (diff) | |
parent | 8b7a31fbfcbbd47f34f4f4edad4d05f25a9d0ecd (diff) |
Merge pull request #378 from neusdan/warning_fixes
Some trivial compiler and PVS-Studio warning fixes
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/cert/x509/x509_obj.cpp | 2 | ||||
-rw-r--r-- | src/lib/cert/x509/x509path.cpp | 2 | ||||
-rw-r--r-- | src/lib/stream/rc4/rc4.cpp | 2 | ||||
-rw-r--r-- | src/lib/stream/rc4/rc4.h | 7 | ||||
-rw-r--r-- | src/lib/tls/msg_client_kex.cpp | 2 | ||||
-rw-r--r-- | src/lib/utils/http_util/http_util.cpp | 1 |
6 files changed, 7 insertions, 9 deletions
diff --git a/src/lib/cert/x509/x509_obj.cpp b/src/lib/cert/x509/x509_obj.cpp index 4dae68607..e908e8cab 100644 --- a/src/lib/cert/x509/x509_obj.cpp +++ b/src/lib/cert/x509/x509_obj.cpp @@ -201,7 +201,7 @@ bool X509_Object::check_signature(const Public_Key& pub_key) const return verifier.verify_message(tbs_data(), signature()); } - catch(std::exception& e) + catch(std::exception&) { return false; } diff --git a/src/lib/cert/x509/x509path.cpp b/src/lib/cert/x509/x509path.cpp index 7e54ad9f9..5e12ddb2a 100644 --- a/src/lib/cert/x509/x509path.cpp +++ b/src/lib/cert/x509/x509path.cpp @@ -170,7 +170,7 @@ check_chain(const std::vector<X509_Certificate>& cert_path, else if(ocsp_status == Certificate_Status_Code::OCSP_RESPONSE_GOOD) continue; } - catch(std::exception& e) + catch(std::exception&) { //std::cout << "OCSP error: " << e.what() << "\n"; } diff --git a/src/lib/stream/rc4/rc4.cpp b/src/lib/stream/rc4/rc4.cpp index 6146e2818..9a6268b8c 100644 --- a/src/lib/stream/rc4/rc4.cpp +++ b/src/lib/stream/rc4/rc4.cpp @@ -111,6 +111,6 @@ void RC4::clear() /* * RC4 Constructor */ -RC4::RC4(size_t s) : SKIP(s), X(0), Y(0) {} +RC4::RC4(size_t s) : SKIP(s) {} } diff --git a/src/lib/stream/rc4/rc4.h b/src/lib/stream/rc4/rc4.h index 60c9450b4..9c4b2717c 100644 --- a/src/lib/stream/rc4/rc4.h +++ b/src/lib/stream/rc4/rc4.h @@ -44,12 +44,11 @@ class BOTAN_DLL RC4 : public StreamCipher void generate(); const size_t SKIP; - - byte X, Y; + byte X = 0; + byte Y = 0; secure_vector<byte> state; - secure_vector<byte> buffer; - size_t position; + size_t position = 0; }; } diff --git a/src/lib/tls/msg_client_kex.cpp b/src/lib/tls/msg_client_kex.cpp index 7ce9b9df2..68809f22f 100644 --- a/src/lib/tls/msg_client_kex.cpp +++ b/src/lib/tls/msg_client_kex.cpp @@ -365,7 +365,7 @@ Client_Key_Exchange::Client_Key_Exchange(const std::vector<byte>& contents, else m_pre_master = shared_secret; } - catch(std::exception &e) + catch(std::exception &) { /* * Something failed in the DH computation. To avoid possible diff --git a/src/lib/utils/http_util/http_util.cpp b/src/lib/utils/http_util/http_util.cpp index 1f67c0b4b..6d4e7c8e8 100644 --- a/src/lib/utils/http_util/http_util.cpp +++ b/src/lib/utils/http_util/http_util.cpp @@ -98,7 +98,6 @@ Response http_sync(http_exch_fn http_transact, const auto protocol_host_sep = url.find("://"); if(protocol_host_sep == std::string::npos) throw Exception("Invalid URL " + url); - const std::string protocol = url.substr(0, protocol_host_sep); const auto host_loc_sep = url.find('/', protocol_host_sep + 3); |