lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx | 26 +++++----- 1 file changed, 13 insertions(+), 13 deletions(-)
New commits: commit b9a83f9ad4bf1d7754e23af5e6e4eb03750adb92 Author: Caolán McNamara <[email protected]> AuthorDate: Sat Jun 18 12:47:18 2022 +0100 Commit: Caolán McNamara <[email protected]> CommitDate: Sat Jun 18 16:10:18 2022 +0200 cid#1506303 silence Unchecked return value and cid#1506308 Unchecked return value from library Change-Id: I2a2057b44f1e1e3b8577b02fb63e5460c7222b11 Reviewed-on: https://gerrit.libreoffice.org/c/core/+/136080 Tested-by: Jenkins Reviewed-by: Caolán McNamara <[email protected]> diff --git a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx index 06b4fcb64175..7b6e8005fcb7 100644 --- a/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx +++ b/lingucomponent/source/spellcheck/languagetool/languagetoolimp.cxx @@ -338,33 +338,33 @@ std::string LanguageToolGrammarChecker::makeHttpRequest(std::string_view aURL, H } std::string response_body; - curl_easy_setopt(curl.get(), CURLOPT_URL, aURL.data()); + (void)curl_easy_setopt(curl.get(), CURLOPT_URL, aURL.data()); - curl_easy_setopt(curl.get(), CURLOPT_FAILONERROR, 1L); - // curl_easy_setopt(curl.get(), CURLOPT_VERBOSE, 1L); + (void)curl_easy_setopt(curl.get(), CURLOPT_FAILONERROR, 1L); + // (void)curl_easy_setopt(curl.get(), CURLOPT_VERBOSE, 1L); - curl_easy_setopt(curl.get(), CURLOPT_WRITEFUNCTION, WriteCallback); - curl_easy_setopt(curl.get(), CURLOPT_WRITEDATA, static_cast<void*>(&response_body)); - curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, false); - curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYHOST, false); - curl_easy_setopt(curl.get(), CURLOPT_TIMEOUT, CURL_TIMEOUT); + (void)curl_easy_setopt(curl.get(), CURLOPT_WRITEFUNCTION, WriteCallback); + (void)curl_easy_setopt(curl.get(), CURLOPT_WRITEDATA, static_cast<void*>(&response_body)); + (void)curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYPEER, false); + (void)curl_easy_setopt(curl.get(), CURLOPT_SSL_VERIFYHOST, false); + (void)curl_easy_setopt(curl.get(), CURLOPT_TIMEOUT, CURL_TIMEOUT); if (method == HTTP_METHOD::HTTP_POST) { - curl_easy_setopt(curl.get(), CURLOPT_POST, 1L); + (void)curl_easy_setopt(curl.get(), CURLOPT_POST, 1L); if (isPremium == false) { - curl_easy_setopt(curl.get(), CURLOPT_POSTFIELDS, aPostData.getStr()); + (void)curl_easy_setopt(curl.get(), CURLOPT_POSTFIELDS, aPostData.getStr()); } else { premiumPostData = aPostData + "&username=" + username + "&apiKey=" + apiKey; - curl_easy_setopt(curl.get(), CURLOPT_POSTFIELDS, premiumPostData.getStr()); + (void)curl_easy_setopt(curl.get(), CURLOPT_POSTFIELDS, premiumPostData.getStr()); } } /*CURLcode cc = */ - curl_easy_perform(curl.get()); + (void)curl_easy_perform(curl.get()); curl_easy_getinfo(curl.get(), CURLINFO_RESPONSE_CODE, &nStatusCode); return response_body; } @@ -404,4 +404,4 @@ lingucomponent_LanguageToolGrammarChecker_get_implementation( css::uno::XComponentContext*, css::uno::Sequence<css::uno::Any> const&) { return cppu::acquire(static_cast<cppu::OWeakObject*>(new LanguageToolGrammarChecker())); -} \ No newline at end of file +}
