Fixed warning with clang

This commit is contained in:
Scott Anderson 2017-05-13 14:34:36 +12:00
parent 861e32a8ab
commit 6460a15d94

View file

@ -1656,7 +1656,7 @@ int auto_group_start_index(const swayc_t *container, int index) {
} else { } else {
start_idx = idx2 + ((index - idx2) / (grp_sz + 1)) * (grp_sz + 1); start_idx = idx2 + ((index - idx2) / (grp_sz + 1)) * (grp_sz + 1);
} }
return MIN(start_idx, container->children->length); return MIN(start_idx, (ssize_t)container->children->length);
} }
} }
@ -1684,7 +1684,7 @@ int auto_group_end_index(const swayc_t *container, int index) {
nxt_idx = idx2 + ((index - idx2) / (grp_sz + 1) + 1) * (grp_sz + 1); nxt_idx = idx2 + ((index - idx2) / (grp_sz + 1) + 1) * (grp_sz + 1);
} }
} }
return MIN(nxt_idx, container->children->length); return MIN(nxt_idx, (ssize_t)container->children->length);
} }
} }