Skip to content
Snippets Groups Projects
  1. Mar 26, 2020
    • c99pedant's avatar
      Quit curl cleanly even if libcurl is old. · 18103982
      c99pedant authored
      Building feh 3.3 on CentOS 7 x86_64 warns `curl_quit_function` in `imlib.c` is unused:
      
      ```
      cc -g -O2 -Wall -Wextra -pedantic -std=c11 -D_POSIX_C_SOURCE=200809L -D_XOPEN_SOURCE=700 -DHAVE_LIBCURL -DHAVE_VERSCMP -DHAVE_LIBXINERAMA -DHAVE_LIBEXIF -DPREFIX=\"/usr/local\" -DPACKAGE=\"feh\" -DVERSION=\"3.3\"   -c -o imlib.o imlib.c
      imlib.c:545:12: warning: ‘curl_quit_function’ defined but not used [-Wunused-function]
       static int curl_quit_function(void *clientp,  curl_off_t dltotal,  curl_off_t dlnow, curl_off_t ultotal, curl_off_t ulnow)
                  ^
      ```
      The `curl_quit_function` code was added in response to pull [#435](https://github.com/derf/feh/pull/435)
      
      In issue [#485](https://github.com/derf/feh/issues/485) a fellow CentOS 7 user had an error building feh because CentOS 7 is locked into an old version of libcurl. In the fix, a version guard was wrapped around the `curl_easy_setopt` call, but the rest of the code was unchanged.
      
      Since I don't want to maintain a local build of libcurl, I looked at the curl docs and noticed there is an older callback which serves the same purpose: https://curl.haxx.se/libcurl/c/CURLOPT_PROGRESSFUNCTION.html
      
      The difference between `PROGRESS` and `XFERINFO` is the callback's argument types, with `PROGRESS` using `double` and `XFERINFO` using `curl_off_t`: https://curl.haxx.se/libcurl/c/CURLOPT_XFERINFOFUNCTION.html
      
      The callback's return value logic and use of `CURLOPT_NOPROGRESS` is the same.
      
      For context, the latest libcurl RPM I'm getting from yum updates is `libcurl-7.29.0-54.el7_7.2.x86_64`. The "stable" versions of other distros may encounter similar issues. The CentOS 7 "End of Life" date is 2024-06-30 so you should hear the end of this by then, at least from us pesky CentOS users.
      Unverified
      18103982
  2. Nov 07, 2019
  3. Dec 04, 2018
  4. Nov 29, 2018
  5. Nov 23, 2018
  6. Nov 04, 2018
  7. Oct 04, 2018
  8. Aug 22, 2018
  9. Aug 05, 2018
  10. May 11, 2018
  11. Mar 10, 2018
  12. Mar 03, 2018
  13. Feb 14, 2018
  14. Jan 20, 2018
  15. Dec 28, 2017
  16. Nov 07, 2017
  17. Oct 29, 2017
  18. Sep 26, 2017
    • Niclas Zeising's avatar
      Fix dead code · f49f0879
      Niclas Zeising authored
      The check if buffer == NULL is always false, since buffer is an
      autoamtic variable allocated when entering the function.  What we
      instead want to do is to check if the string is empty after the call to
      exif_get_info(), since that means we could not read any exif
      information.
      When the code once more is enabled, I discovered that we need to copy
      the information string into info_buf as well as into  buffer, since it
      is the former that is used to print the exif information on top of the
      picture.  Without this change, imlib warns about trying to write NULL
      strings.
      f49f0879
    • Niclas Zeising's avatar
      Remove unused variable · 9b4341e1
      Niclas Zeising authored
      9b4341e1
  19. Sep 05, 2017
  20. Aug 25, 2017
  21. Aug 05, 2017
  22. Oct 30, 2016
  23. Oct 29, 2016
  24. Jul 24, 2016
  25. Jul 22, 2016
  26. Jun 23, 2016
  27. Jun 19, 2016
  28. May 03, 2016
  29. Feb 10, 2016
  30. Jan 08, 2016
    • William Woodruff's avatar
      Changes: · 3e8b853e
      William Woodruff authored
      * Added an --insecure option to disable host/peer verification in libcurl.
      This allows feh to load images on HTTPS hosts with self-signed certificates.
      For security, this is not the default.
      
      * Fixed an include in show_usage.
      3e8b853e
  31. Jul 23, 2015
  32. Apr 07, 2015
  33. Apr 06, 2015
Loading