diff options
| author | Joel Klinghed <the_jk@yahoo.com> | 2017-08-10 21:10:23 +0200 |
|---|---|---|
| committer | Joel Klinghed <the_jk@yahoo.com> | 2017-08-10 21:12:52 +0200 |
| commit | e3f7ecc6bdf7bbd1ae7ec10c387e15743842db90 (patch) | |
| tree | bbe2e05ec16f4214e02dd9e0904af97998955c63 /src | |
| parent | 725cb48b8909588b41c86c680e40b0a7df13e384 (diff) | |
Fix some issues and improvements found by cppcheck
Diffstat (limited to 'src')
| -rw-r--r-- | src/gui_qt.cc | 4 | ||||
| -rw-r--r-- | src/protocols.cc | 2 | ||||
| -rw-r--r-- | src/ssl_openssl.cc | 2 | ||||
| -rw-r--r-- | src/url.hh | 1 |
4 files changed, 4 insertions, 5 deletions
diff --git a/src/gui_qt.cc b/src/gui_qt.cc index 16102d6..76611e4 100644 --- a/src/gui_qt.cc +++ b/src/gui_qt.cc @@ -922,8 +922,8 @@ void QtGuiStatusBar::set_override(std::string const& str) { class QtGuiAbout : public virtual GuiAbout, public QtGuiWindow { public: QtGuiAbout(std::string const& title, std::string const& version, - std::vector<std::string> const& authors) { - title_ = title + " " + version; + std::vector<std::string> const& authors) + : title_(title + " " + version) { auto it = authors.begin(); while (it != authors.end()) { text_ += *it++; diff --git a/src/protocols.cc b/src/protocols.cc index 8d3689c..9598093 100644 --- a/src/protocols.cc +++ b/src/protocols.cc @@ -327,8 +327,6 @@ private: match.reset(); } else if (text) { cache_entry_with_lock(id, size, std::move(match), std::move(text)); - assert(!match); - assert(!text); id = 0; offset = 0; } diff --git a/src/ssl_openssl.cc b/src/ssl_openssl.cc index 14c3162..046687b 100644 --- a/src/ssl_openssl.cc +++ b/src/ssl_openssl.cc @@ -137,7 +137,7 @@ public: SSLImpl(Logger* logger, uint16_t flags) : logger_(logger), flags_(flags), bio_meth_(BIO_meth_new(99 | BIO_TYPE_SOURCE_SINK, "SSLImpl")), - ctx_(nullptr), ssl_(nullptr), + ctx_(nullptr), ssl_(nullptr), state_(HANDSHAKE), bio_(nullptr), rbuf_(nullptr), wbuf_(nullptr) { BIO_meth_set_write(bio_meth_, bio_write); BIO_meth_set_read(bio_meth_, bio_read); @@ -59,6 +59,7 @@ public: protected: Url() {} Url(Url const&) = delete; + Url& operator=(Url const&) = delete; }; #endif // URL_HH |
