Merge branch 'fix-yajl1-warnings'
This commit is contained in:
commit
167b38b184
|
@ -210,9 +210,13 @@ void stdin_io_cb(struct ev_loop *loop, ev_io *watcher, int revents) {
|
||||||
}
|
}
|
||||||
if (!plaintext) {
|
if (!plaintext) {
|
||||||
yajl_status status = yajl_parse(parser, json_input, rec);
|
yajl_status status = yajl_parse(parser, json_input, rec);
|
||||||
|
#if YAJL_MAJOR >= 2
|
||||||
if (status != yajl_status_ok) {
|
if (status != yajl_status_ok) {
|
||||||
fprintf(stderr, "[i3bar] Could not parse JSON input: %.*s\n",
|
#else
|
||||||
rec, json_input);
|
if (status != yajl_status_ok && status != yajl_status_insufficient_data) {
|
||||||
|
#endif
|
||||||
|
fprintf(stderr, "[i3bar] Could not parse JSON input (code %d): %.*s\n",
|
||||||
|
status, rec, json_input);
|
||||||
}
|
}
|
||||||
free(buffer);
|
free(buffer);
|
||||||
} else {
|
} else {
|
||||||
|
|
Loading…
Reference in New Issue