Aanok / jftui

Jellyfin Terminal User Interface
The Unlicense
142 stars 7 forks source link

Build error - void value not ignored #34

Closed marvin8 closed 1 year ago

marvin8 commented 1 year ago

jftui version jftui-0.6.1.tar.gz

Describe the bug 1) Downloaded the 0.6.1 release tar.gz file and extracted it to a folder. 2) cd into the folder (contains README.md, Makefile, src) 3) run make

Make returns:

mkdir -p build
cc `pkg-config --cflags libcurl yajl mpv` -O2 -march=native src/linenoise.c src/shared.c src/config.c src/disk.c src/json.c src/menu.c src/playback.c src/net.c src/main.c `pkg-config --libs libcurl yajl mpv` -pthread -g -o build/jftui
In file included from src/net.c:1:
src/net.c: In function ‘jf_net_handle_before_perform’:
src/net.c:424:28: error: void value not ignored as it ought to be
  424 |             JF_CURL_ASSERT(curl_easy_setopt(handle,
      |                            ^
src/net.h:12:19: note: in definition of macro ‘JF_CURL_ASSERT’
   12 |     CURLcode _c = _s;                                                       \
      |                   ^~
make: *** [Makefile:41: build/jftui] Error 1

To Reproduce As above

Expected behavior It be nice if the compile didn't fail and produced an executable

SIGSEGV backtrace Not applicable

Environment I am trying to build jftui on a Ryzen pc running uptodate manjaro.

Aanok commented 1 year ago

Hi! I need to look more into it, but at a quick glance I cannot reproduce this and I can't really figure out why it would happen. Can you tell me your version of compiler and of the curl library?

EDIT - should be gcc 12.2.0 and curl 7.87, right?

EDIT 2 - Nevermind, I got it. Seems to be something with gcc, because it builds fine with clang.

marvin8 commented 1 year ago

Thanks Aanok... downloaded 0.6.2 which builds without any issues.

Having had a quick try, I can see that jftui might be something I be using quite a bit. Thanks for creating it :heart: