diff options
author | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-01-17 20:25:44 +0200 |
---|---|---|
committer | Aqua-sama <aqua@iserlohn-fortress.net> | 2020-01-17 21:27:00 +0200 |
commit | cb30cee7a065a074394347f112451decc4847674 (patch) | |
tree | 25f0ef36bb776a5e1938232e132b0a464fd5a9bc /lib/pluginloader | |
parent | Merge branch 'firefox-bookmarks-json-importer' (diff) | |
download | smolbote-cb30cee7a065a074394347f112451decc4847674.tar.xz |
Fix various gcc and clazy compile warnings
Diffstat (limited to 'lib/pluginloader')
-rw-r--r-- | lib/pluginloader/pluginloader.cpp | 4 | ||||
-rw-r--r-- | lib/pluginloader/pluginloader.h | 4 |
2 files changed, 5 insertions, 3 deletions
diff --git a/lib/pluginloader/pluginloader.cpp b/lib/pluginloader/pluginloader.cpp index ef17513..c8358bf 100644 --- a/lib/pluginloader/pluginloader.cpp +++ b/lib/pluginloader/pluginloader.cpp @@ -49,7 +49,7 @@ PluginLoader::VerifyState PluginLoader::verify(const char *hashName) const int read = 0; auto *buf = new unsigned char[1024]; while(len > 0) { - read = plugin.read((char*) buf, 1024); + read = plugin.read(reinterpret_cast<char*>(buf), 1024); len -= read; rc = EVP_DigestVerifyUpdate(ctx, buf, read); @@ -65,7 +65,7 @@ PluginLoader::VerifyState PluginLoader::verify(const char *hashName) const const int sig_len = sigFile.size(); const auto* sig = [&sigFile, sig_len]() { auto* buf = new unsigned char[sig_len]; - sigFile.read((char*) buf, sig_len); + sigFile.read(reinterpret_cast<char*>(buf), sig_len); return buf; }(); sigFile.close(); diff --git a/lib/pluginloader/pluginloader.h b/lib/pluginloader/pluginloader.h index 0c8bcd3..48be61d 100644 --- a/lib/pluginloader/pluginloader.h +++ b/lib/pluginloader/pluginloader.h @@ -40,7 +40,9 @@ public: QString errorString() const { if(signature < requiredSignatureLevel) - return QString("Required signature level: %2; Signature level: %3").arg(QString::number((int) requiredSignatureLevel), QString::number((int) signature)); + return QString("Required signature level: %2; Signature level: %3").arg( + QString::number(static_cast<int>(requiredSignatureLevel)), + QString::number(static_cast<int>(signature))); else return QPluginLoader::errorString(); } |