Fix compile warnings.

This commit is contained in:
XMRig 2020-08-24 10:04:46 +07:00
parent bc128d11d9
commit 72c8404d18
No known key found for this signature in database
GPG key ID: 446A53638BE94409
5 changed files with 13 additions and 4 deletions

View file

@ -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<int>(strchr(v, ' ') - v), v);
# endif
}

View file

@ -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<int>(strchr(v, ' ') - v), v);
libs += buf;
# endif