Minor changes to build against json-c 0.13.x

I'm not convinced my change to CMakeLists is the correct way to squelch
the json-c version error when building on a system with version
numbers greater than 0.12.1. 0.13.x+ is supposed to be backwards
compatible. Rest of the changes involve replacing int with size_t
where necessary to suppress -Werror=sign-compare on gcc 8.
This commit is contained in:
Jae Jang 2018-04-06 20:59:28 -04:00
parent 8e06985cc1
commit 0ed0c824e9
6 changed files with 8 additions and 8 deletions

View file

@ -149,7 +149,7 @@ static void pretty_print_version(json_object *v) {
static void pretty_print_clipboard(json_object *v) {
if (success(v, true)) {
if (json_object_is_type(v, json_type_array)) {
for (int i = 0; i < json_object_array_length(v); ++i) {
for (size_t i = 0; i < json_object_array_length(v); ++i) {
json_object *o = json_object_array_get_idx(v, i);
printf("%s\n", json_object_get_string(o));
}