ctl: Fix sign compare warnings

pull/196/head
Andri Yngvason 2022-11-26 21:13:41 +00:00
parent c3c3e97794
commit 052160cbd4
2 changed files with 3 additions and 3 deletions

View File

@ -397,7 +397,7 @@ static void pretty_client_list(json_t* data)
int n = json_array_size(data);
printf("There %s %d VNC client%s connected%s\n", (n == 1) ? "is" : "are",
n, (n == 1) ? "" : "s", (n > 0) ? ":" : ".");
int i;
size_t i;
json_t* value;
json_array_foreach(data, i, value) {
char* id = NULL;
@ -417,7 +417,7 @@ static void pretty_output_list(json_t* data)
int n = json_array_size(data);
printf("There %s %d output%s%s\n", (n == 1) ? "is" : "are",
n, (n == 1) ? "" : "s", (n > 0) ? ":" : ".");
int i;
size_t i;
json_t* value;
json_array_foreach(data, i, value) {
char* name = NULL;

View File

@ -505,7 +505,7 @@ static struct cmd_response* generate_output_list(struct ctl* self)
struct cmd_response* response = cmd_ok();
response->data = json_array();
for (int i = 0; i < num_outputs; ++i)
for (size_t i = 0; i < num_outputs; ++i)
json_array_append_new(response->data, json_pack(
"{s:s, s:s, s:i, s:i, s:b}",
"name", outputs[i].name,