ctl: Fix sign compare warnings
parent
c3c3e97794
commit
052160cbd4
|
@ -397,7 +397,7 @@ static void pretty_client_list(json_t* data)
|
||||||
int n = json_array_size(data);
|
int n = json_array_size(data);
|
||||||
printf("There %s %d VNC client%s connected%s\n", (n == 1) ? "is" : "are",
|
printf("There %s %d VNC client%s connected%s\n", (n == 1) ? "is" : "are",
|
||||||
n, (n == 1) ? "" : "s", (n > 0) ? ":" : ".");
|
n, (n == 1) ? "" : "s", (n > 0) ? ":" : ".");
|
||||||
int i;
|
size_t i;
|
||||||
json_t* value;
|
json_t* value;
|
||||||
json_array_foreach(data, i, value) {
|
json_array_foreach(data, i, value) {
|
||||||
char* id = NULL;
|
char* id = NULL;
|
||||||
|
@ -417,7 +417,7 @@ static void pretty_output_list(json_t* data)
|
||||||
int n = json_array_size(data);
|
int n = json_array_size(data);
|
||||||
printf("There %s %d output%s%s\n", (n == 1) ? "is" : "are",
|
printf("There %s %d output%s%s\n", (n == 1) ? "is" : "are",
|
||||||
n, (n == 1) ? "" : "s", (n > 0) ? ":" : ".");
|
n, (n == 1) ? "" : "s", (n > 0) ? ":" : ".");
|
||||||
int i;
|
size_t i;
|
||||||
json_t* value;
|
json_t* value;
|
||||||
json_array_foreach(data, i, value) {
|
json_array_foreach(data, i, value) {
|
||||||
char* name = NULL;
|
char* name = NULL;
|
||||||
|
|
|
@ -505,7 +505,7 @@ static struct cmd_response* generate_output_list(struct ctl* self)
|
||||||
struct cmd_response* response = cmd_ok();
|
struct cmd_response* response = cmd_ok();
|
||||||
|
|
||||||
response->data = json_array();
|
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(
|
json_array_append_new(response->data, json_pack(
|
||||||
"{s:s, s:s, s:i, s:i, s:b}",
|
"{s:s, s:s, s:i, s:i, s:b}",
|
||||||
"name", outputs[i].name,
|
"name", outputs[i].name,
|
||||||
|
|
Loading…
Reference in New Issue