mirror of
https://github.com/swaywm/sway.git
synced 2026-04-29 06:46:22 -04:00
Use type casts to size_t for return types of json_object_array_length
This will future proof the code, as it seems that the next release of json-c will return size_t array lengths
This commit is contained in:
parent
e39d663135
commit
ccc83f7f76
6 changed files with 14 additions and 17 deletions
|
|
@ -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 < (size_t)json_object_array_length(v); ++i) {
|
||||
json_object *o = json_object_array_get_idx(v, i);
|
||||
printf("%s\n", json_object_get_string(o));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue