eafer / rdrview

Firefox Reader View as a command line tool
Apache License 2.0
835 stars 35 forks source link

‘CURLOPT_PROTOCOLS’ is deprecated #38

Open nebulosa2007 opened 3 weeks ago

nebulosa2007 commented 3 weeks ago

https://github.com/eafer/rdrview/blob/36428005eabfb1a8d1b203ee47fa59303793fcb0/src/rdrview.c#L243

I got a warning while compiling:

src/rdrview.c: In function ‘url_to_file’:
src/rdrview.c:243:9: warning: ‘CURLOPT_PROTOCOLS’ is deprecated: since 7.85.0. Use CURLOPT_PROTOCOLS_STR [-Wdeprecated-declarations]
  243 |         if (curl_easy_setopt(curl, CURLOPT_PROTOCOLS, protocols))
      |         ^~
In file included from src/rdrview.c:39:
/usr/include/curl/curl.h:1749:3: note: declared here
 1749 |   CURLOPTDEPRECATED(CURLOPT_PROTOCOLS, CURLOPTTYPE_LONG, 181,
      |   ^~~~~~~~~~~~~~~~~

gcc (GCC) 14.1.1 20240522

eafer commented 3 weeks ago

Thanks for the report. I guess this is very new, my distro's libcurl doesn't even have CURLOPT_PROTOCOLS_STR. I'll look into it over the weekend.