diff --git a/src/base/kernel/Entry.cpp b/src/base/kernel/Entry.cpp index ae2ac3ce2..a50cb6342 100644 --- a/src/base/kernel/Entry.cpp +++ b/src/base/kernel/Entry.cpp @@ -84,7 +84,7 @@ static int showVersion() # if defined(LIBRESSL_VERSION_TEXT) printf("LibreSSL/%s\n", LIBRESSL_VERSION_TEXT + 9); # elif defined(OPENSSL_VERSION_TEXT) - constexpr const char *v = OPENSSL_VERSION_TEXT + 8; + constexpr const char *v = &OPENSSL_VERSION_TEXT[8]; printf("OpenSSL/%.*s\n", static_cast(strchr(v, ' ') - v), v); # endif } diff --git a/src/base/kernel/config/BaseConfig.cpp b/src/base/kernel/config/BaseConfig.cpp index 2e3a598c9..27aa2ce90 100644 --- a/src/base/kernel/config/BaseConfig.cpp +++ b/src/base/kernel/config/BaseConfig.cpp @@ -157,7 +157,7 @@ void xmrig::BaseConfig::printVersions() snprintf(buf, sizeof buf, "LibreSSL/%s ", LIBRESSL_VERSION_TEXT + 9); libs += buf; # elif defined(OPENSSL_VERSION_TEXT) - constexpr const char *v = OPENSSL_VERSION_TEXT + 8; + constexpr const char *v = &OPENSSL_VERSION_TEXT[8]; snprintf(buf, sizeof buf, "OpenSSL/%.*s ", static_cast(strchr(v, ' ') - v), v); libs += buf; # endif diff --git a/src/base/net/http/HttpListener.h b/src/base/net/http/HttpListener.h index ac302dab9..4f982c4df 100644 --- a/src/base/net/http/HttpListener.h +++ b/src/base/net/http/HttpListener.h @@ -29,13 +29,20 @@ namespace xmrig { class HttpListener : public IHttpListener { public: - inline HttpListener(IHttpListener *listener, const char *tag = nullptr) : m_tag(tag), m_listener(listener) {} + inline HttpListener(IHttpListener *listener, const char *tag = nullptr) : +# ifdef APP_DEBUG + m_tag(tag), +# endif + m_listener(listener) + {} protected: void onHttpData(const HttpData &data) override; private: +# ifdef APP_DEBUG const char *m_tag; +# endif IHttpListener *m_listener; }; diff --git a/src/crypto/kawpow/KPCache.cpp b/src/crypto/kawpow/KPCache.cpp index f46341028..2a60a7878 100644 --- a/src/crypto/kawpow/KPCache.cpp +++ b/src/crypto/kawpow/KPCache.cpp @@ -91,7 +91,7 @@ bool KPCache::init(uint32_t epoch) const uint32_t a = (cache_nodes * i) / n; const uint32_t b = (cache_nodes * (i + 1)) / n; - threads.emplace_back([this, a, b, cache_nodes, &cache]() { + threads.emplace_back([this, a, b, &cache]() { uint32_t j = a; for (; j + 4 <= b; j += 4) ethash_calculate_dag_item4_opt(((node*)m_DAGCache.data()) + j, j, num_dataset_parents, &cache); for (; j < b; ++j) ethash_calculate_dag_item_opt(((node*)m_DAGCache.data()) + j, j, num_dataset_parents, &cache); diff --git a/src/crypto/randomx/randomx.cpp b/src/crypto/randomx/randomx.cpp index 5bfd9e781..fdd7bd067 100644 --- a/src/crypto/randomx/randomx.cpp +++ b/src/crypto/randomx/randomx.cpp @@ -207,7 +207,9 @@ RandomX_ConfigurationBase::RandomX_ConfigurationBase() # endif } +#ifdef XMRIG_ARMv8 static uint32_t Log2(size_t value) { return (value > 1) ? (Log2(value / 2) + 1) : 0; } +#endif void RandomX_ConfigurationBase::Apply() {