From 45f4a96ea7ef88ed790021420a654b3a6c26d4b7 Mon Sep 17 00:00:00 2001 From: casey langen Date: Mon, 5 Oct 2020 23:00:25 -0700 Subject: [PATCH] Fixed LastFm compiler warnings with some good old fashioned gross casts. --- src/core/support/LastFm.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/core/support/LastFm.cpp b/src/core/support/LastFm.cpp index 3aa3172b9..dd9e1f595 100644 --- a/src/core/support/LastFm.cpp +++ b/src/core/support/LastFm.cpp @@ -77,7 +77,7 @@ static void validate(musik::core::lastfm::Session& session) { static std::string encode(std::string value) { static CURL* curl = curl_easy_init(); if (curl && value.c_str()) { - char* encoded = curl_easy_escape(curl, value.c_str(), value.size()); + char* encoded = curl_easy_escape(curl, value.c_str(), (int) value.size()); if (encoded) { value = encoded; curl_free(encoded); @@ -109,7 +109,7 @@ static std::string gernateSignedUrlParams( EX_MD5_CTX context = {}; unsigned char rawDigest[16]; Ex_MD5_Init(&context); - Ex_MD5_Update(&context, (const void*)toHash.c_str(), toHash.length()); + Ex_MD5_Update(&context, (const void*)toHash.c_str(), (unsigned long) toHash.length()); Ex_MD5_Final(rawDigest, &context); /* convert to hex */