taviso / nntpit

minimalist reddit2nntp gateway
MIT License
245 stars 10 forks source link

compile error on Debian 8 #1

Closed taviso closed 3 years ago

taviso commented 3 years ago

A user on twitter reports that there is a compile error on Debian:

‘reddit_spool_store’: 
spool.c:70:9: error: void value not ignored as it ought to be
if (json_object_object_add(spool, id, object) == -1) {

I can't really figure out what it's warning about, and can't reproduce that problem. That value isn't void,

User says: gcc version 8.3.0 (Debian 8.3.0-6)

taviso commented 3 years ago

Ah-ha, it was an API change: version 0.10 of json-c json_object_object_add returned void, later versions return int.

https://json-c.github.io/json-c/json-c-0.10/doc/html/json__object_8h.html#a04448b1c63173e1bfe49965835732075

OK, I think this is fixed in 8be0736067d22bbd7bad6a605be8d81b2a9e7618