goto error;
if (json_object_is_type(item, json_type_array)) {
/* Is an array! */
- count = json_object_array_length(item);
+ count = (int)json_object_array_length(item);
index = 0;
while(index < count) {
rc = packsingle(msg, subsig, json_object_array_get_idx(item, index++));
}
/* iterate over elements */
- count = json_object_array_length(list);
+ count = (int)json_object_array_length(list);
index = 0;
for (;;) {
/* check state */
json_object_iter_next(&it);
}
} else if (json_object_is_type(spec, json_type_array)) {
- n = json_object_array_length(spec);
+ n = (int)json_object_array_length(spec);
for (i = 0 ; i < n ; i++)
get_verbosity_of(resu, json_object_get_string(json_object_array_get_idx(spec, i)));
} else if (json_object_is_type(spec, json_type_string)) {
json_object_iter_next(&it);
}
} else if (json_object_is_type(spec, json_type_array)) {
- n = json_object_array_length(spec);
+ n = (int)json_object_array_length(spec);
for (i = 0 ; i < n ; i++)
get_one_api(resu, json_object_get_string(json_object_array_get_idx(spec, i)), NULL);
} else if (json_object_is_type(spec, json_type_string)) {
case json_type_array:
/* expand the values of arrays */
i = 0;
- n = json_object_array_length(path.object);
+ n = (int)json_object_array_length(path.object);
while (i != n) {
o = json_object_array_get_idx(path.object, i);
x = expand((struct path){ .object = o, .upper = &path });
case json_type_array:
/* expand the values of arrays */
i = 0;
- n = json_object_array_length(path.object);
+ n = (int)json_object_array_length(path.object);
while (i != n) {
o = json_object_array_get_idx(path.object, i);
x = expand_$ref((struct path){ .object = o, .upper = &path });
int i, n;
const char *fmtstr = cpp ? "\t%s" : "\t{ %s }";
- n = a_perms ? json_object_array_length(a_perms) : 0;
+ n = a_perms ? (int)json_object_array_length(a_perms) : 0;
if (n) {
printf("static const struct afb_auth _afb_auths_%s[] = {\n" , capi);
i = 0;
}
/* creates the reference in the structure */
- asprintf(&b, "&_afb_auths_%s[%d]", capi, json_object_array_length(a_perms));
+ asprintf(&b, "&_afb_auths_%s[%d]", capi, (int)json_object_array_length(a_perms));
x = json_object_new_string(desc);
y = json_object_new_string(b);
json_object_array_add(a_perms, x);
opstr = op==And ? "And" : "Or";
}
x = NULL;
- i = n = obj ? json_object_array_length(obj) : 0;
+ i = n = obj ? (int)json_object_array_length(obj) : 0;
while (i) {
y = decl_perm(json_object_array_get_idx(obj, --i));
if (!y)
{
int i, n, x, y;
- n = obj ? json_object_array_length(obj) : 0;
+ n = obj ? (int)json_object_array_length(obj) : 0;
if (n == 0)
return 0;
*/
static struct json_object *clone_array(struct json_object *array, int subdepth)
{
- int n = json_object_array_length(array);
+ int n = (int)json_object_array_length(array);
struct json_object *r = json_object_new_array();
while (n) {
n--;
break;
case json_type_array:
- nx = json_object_array_length(x);
- ny = json_object_array_length(y);
+ nx = (int)json_object_array_length(x);
+ ny = (int)json_object_array_length(y);
r = nx - ny;
if (r > 0 && inc)
r = 0;