@@ -1722,7 +1722,7 @@ libxl__json_map_node *libxl__json_map_node_get(const libxl__json_object *o,
_hidden const libxl__json_object *libxl__json_map_get(const char *key,
const libxl__json_object *o,
libxl__json_node_type expected_type);
-_hidden yajl_status libxl__json_object_to_yajl_gen(libxl__gc *gc_opt,
+_hidden yajl_gen_status libxl__json_object_to_yajl_gen(libxl__gc *gc_opt,
yajl_gen hand,
libxl__json_object *param);
_hidden void libxl__json_object_free(libxl__gc *gc_opt,
@@ -366,12 +366,12 @@ const libxl__json_object *libxl__json_map_get(const char *key,
return NULL;
}
-yajl_status libxl__json_object_to_yajl_gen(libxl__gc *gc,
- yajl_gen hand,
- libxl__json_object *obj)
+yajl_gen_status libxl__json_object_to_yajl_gen(libxl__gc *gc,
+ yajl_gen hand,
+ libxl__json_object *obj)
{
int idx = 0;
- yajl_status rc;
+ yajl_gen_status rc;
switch (obj->type) {
case JSON_NULL:
@@ -390,17 +390,17 @@ yajl_status libxl__json_object_to_yajl_gen(libxl__gc *gc,
libxl__json_map_node *node = NULL;
rc = yajl_gen_map_open(hand);
- if (rc != yajl_status_ok)
+ if (rc != yajl_gen_status_ok)
return rc;
for (idx = 0; idx < obj->u.map->count; idx++) {
if (flexarray_get(obj->u.map, idx, (void**)&node) != 0)
break;
rc = libxl__yajl_gen_asciiz(hand, node->map_key);
- if (rc != yajl_status_ok)
+ if (rc != yajl_gen_status_ok)
return rc;
rc = libxl__json_object_to_yajl_gen(gc, hand, node->obj);
- if (rc != yajl_status_ok)
+ if (rc != yajl_gen_status_ok)
return rc;
}
return yajl_gen_map_close(hand);
@@ -409,13 +409,13 @@ yajl_status libxl__json_object_to_yajl_gen(libxl__gc *gc,
libxl__json_object *node = NULL;
rc = yajl_gen_array_open(hand);
- if (rc != yajl_status_ok)
+ if (rc != yajl_gen_status_ok)
return rc;
for (idx = 0; idx < obj->u.array->count; idx++) {
if (flexarray_get(obj->u.array, idx, (void**)&node) != 0)
break;
rc = libxl__json_object_to_yajl_gen(gc, hand, node);
- if (rc != yajl_status_ok)
+ if (rc != yajl_gen_status_ok)
return rc;
}
return yajl_gen_array_close(hand);
All the functions in lixbl__json_object_to_yajl_gen returns an yajl_gen_status enum. Also replace yal_gen_status_ok by yalj_gen_status_ok. This is fix compilation with clang 3.5: libxl_json.c:378:16: error: implicit conversion from enumeration type 'yajl_gen_status' to different enumeration type 'yajl_status' [-Werror,-Wenum-conversion] return yajl_gen_null(hand); ~~~~~~ ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Julien Grall <julien.grall@linaro.org> Cc: Ian Jackson <ian.jackson@eu.citrix.com> Cc: Stefano Stabellini <stefano.stabellini@eu.citrix.com> Cc: Ian Campbell <ian.campbell@citrix.com> --- tools/libxl/libxl_internal.h | 2 +- tools/libxl/libxl_json.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-)