SimonKagstrom / kcov

Code coverage tool for compiled programs, Python and Bash which uses debugging information to collect and report data without special compilation options
http://simonkagstrom.github.io/kcov/
GNU General Public License v2.0
709 stars 109 forks source link

libcurl 7.56.0 deprecations #409

Open particleflux opened 10 months ago

particleflux commented 10 months ago

The usage of curl in the coveralls-writer gives a bunch of deprecation warnings when compiled against recent libcurl.

It would appear some of the CURLFORM things have been replaced with curl_mime_* functionality.

/var/tmp/portage/dev-util/kcov-42/work/kcov-42/src/writers/coveralls-writer.cc: In member function ‘bool CurlConnectionHandler::talk(const std::string&)’:
/var/tmp/portage/dev-util/kcov-42/work/kcov-42/src/writers/coveralls-writer.cc:65:33: warning: ‘CURLFORM_COPYNAME’ is deprecated: since 7.56.0. Use curl_mime_name() [-Wdeprecated-declarations]
   65 |                                 CURLFORM_COPYNAME, "json_file",
      |                                 ^~~~~~~~~~~~~~~~~
In file included from /var/tmp/portage/dev-util/kcov-42/work/kcov-42/src/writers/coveralls-writer.cc:16:
/usr/include/curl/curl.h:2510:3: note: declared here
 2510 |   CURLFORM_COPYNAME        CURL_DEPRECATED(7.56.0, "Use curl_mime_name()"),
      |   ^~~~~~~~~~~~~~~~~
/var/tmp/portage/dev-util/kcov-42/work/kcov-42/src/writers/coveralls-writer.cc:66:33: warning: ‘CURLFORM_FILE’ is deprecated: since 7.56.0. Use curl_mime_filedata() [-Wdeprecated-declarations]
   66 |                                 CURLFORM_FILE, fileName.c_str(),
      |                                 ^~~~~~~~~~~~~
/usr/include/curl/curl.h:2519:3: note: declared here
 2519 |   CURLFORM_FILE            CURL_DEPRECATED(7.56.0, "Use curl_mime_filedata()"),
      |   ^~~~~~~~~~~~~
/var/tmp/portage/dev-util/kcov-42/work/kcov-42/src/writers/coveralls-writer.cc:63:29: warning: ‘CURLFORMcode curl_formadd(curl_httppost**, curl_httppost**, ...)’ is deprecated: since 7.56.0. Use curl_mime_init() [-Wdeprecated-declarations]
   63 |                 curl_formadd(&formpost,
      |                 ~~~~~~~~~~~~^~~~~~~~~~~
   64 |                                 &lastptr,
      |                                 ~~~~~~~~~
   65 |                                 CURLFORM_COPYNAME, "json_file",
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   66 |                                 CURLFORM_FILE, fileName.c_str(),
      |                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
   67 |                                 CURLFORM_END);
      |                                 ~~~~~~~~~~~~~
/usr/include/curl/curl.h:2585:1: note: declared here
 2585 | curl_formadd(struct curl_httppost **httppost,
      | ^~~~~~~~~~~~
/var/tmp/portage/dev-util/kcov-42/work/kcov-42/src/writers/coveralls-writer.cc:69:42: warning: ‘CURLOPT_HTTPPOST’ is deprecated: since 7.56.0. Use CURLOPT_MIMEPOST [-Wdeprecated-declarations]
   69 |                 curl_easy_setopt(m_curl, CURLOPT_HTTPPOST, formpost);
      |                                          ^~~~~~~~~~~~~~~~
/usr/include/curl/curl.h:1199:3: note: declared here
 1199 |   CURLOPTDEPRECATED(CURLOPT_HTTPPOST, CURLOPTTYPE_OBJECTPOINT, 24,
      |   ^~~~~~~~~~~~~~~~~
/var/tmp/portage/dev-util/kcov-42/work/kcov-42/src/writers/coveralls-writer.cc:73:30: warning: ‘void curl_formfree(curl_httppost*)’ is deprecated: since 7.56.0. Use curl_mime_free() [-Wdeprecated-declarations]
   73 |                 curl_formfree(formpost);
      |                 ~~~~~~~~~~~~~^~~~~~~~~~
/usr/include/curl/curl.h:2621:1: note: declared here
 2621 | curl_formfree(struct curl_httppost *form);
      | ^~~~~~~~~~~~~

See:

SimonKagstrom commented 10 months ago

Thanks!

I think they might be fixed in 7b0c3ae. However, I no longer use coveralls, so I'm not really sure if it will work or not. Apparently, my pushes to the kcov repo stopped working in coveralls in 2021, so there might be something else which changed there.