diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-05-26 22:23:25 +0300 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-05-28 19:43:45 +0300 |
commit | 9c4dd932c6d692178bb8d5265c634126cb415767 (patch) | |
tree | 527300f8e710859965c142aed4e779a16b9d4ab6 /lib/pluginloader | |
parent | Update ProfileEditor plugin (diff) | |
download | smolbote-9c4dd932c6d692178bb8d5265c634126cb415767.tar.xz |
Turn on more warnings by default
- fix clazy warnings
- fix various other compiler warnings
- bugfix: connect profiles' downloadRequested signal
Diffstat (limited to 'lib/pluginloader')
-rw-r--r-- | lib/pluginloader/pluginloader.cpp | 6 | ||||
-rw-r--r-- | lib/pluginloader/pluginloader.h | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/lib/pluginloader/pluginloader.cpp b/lib/pluginloader/pluginloader.cpp index 082a449..ce84c7a 100644 --- a/lib/pluginloader/pluginloader.cpp +++ b/lib/pluginloader/pluginloader.cpp @@ -65,7 +65,11 @@ bool PluginLoader::verify(const char *hashName) const std::size_t buffer_size = 1024; std::vector<char> buffer(buffer_size); - while(const auto sz = plugin.readsome(&buffer.front(), buffer_size)) { + std::size_t sz = 0; + while(true) { + sz = static_cast<std::size_t>(plugin.readsome(&buffer.front(), buffer_size)); + if(sz <= 0) + break; rc = EVP_DigestVerifyUpdate(ctx, reinterpret_cast<unsigned char *>(buffer.data()), sz); if(rc != 1) { m_sigError = tr("Failed to compute signature (stage=update)"); diff --git a/lib/pluginloader/pluginloader.h b/lib/pluginloader/pluginloader.h index 703c285..cc67901 100644 --- a/lib/pluginloader/pluginloader.h +++ b/lib/pluginloader/pluginloader.h @@ -45,6 +45,6 @@ public: bool verify(const char *hashName = "SHA256"); private: - const int m_state; + const signature_state_t m_state; QString m_sigError; }; |