mirror of
https://github.com/swaywm/sway.git
synced 2026-04-30 06:46:24 -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
|
|
@ -584,8 +584,8 @@ int main(int argc, char **argv) {
|
|||
|
||||
for (i = 0; i < registry->outputs->length; ++i) {
|
||||
if (displays_paths[i * 2] != NULL) {
|
||||
for (int j = 0;; ++j) {
|
||||
if (j >= json_object_array_length(json_outputs)) {
|
||||
for (size_t j = 0;; ++j) {
|
||||
if (j >= (size_t)json_object_array_length(json_outputs)) {
|
||||
sway_log(L_ERROR, "%s is not an extant output", displays_paths[i * 2]);
|
||||
exit(EXIT_FAILURE);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue