From patchwork Tue Mar 25 16:55:40 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Julien Grall X-Patchwork-Id: 27075 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pb0-f71.google.com (mail-pb0-f71.google.com [209.85.160.71]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 891B720539 for ; Tue, 25 Mar 2014 16:58:53 +0000 (UTC) Received: by mail-pb0-f71.google.com with SMTP id up15sf1814225pbc.6 for ; Tue, 25 Mar 2014 09:58:52 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:delivered-to:from:to:date:message-id:in-reply-to :references:cc:subject:precedence:list-id:list-unsubscribe:list-post :list-help:list-subscribe:mime-version:sender:errors-to :x-original-sender:x-original-authentication-results:mailing-list :list-archive:content-type:content-transfer-encoding; bh=ptMI4WJe2nXdsA8w0R8Np7ajGFzLhkmWY2RCZF9vN9k=; b=NpeERHrHXQ2G1/yNX0IfOCKxX0qi0eYvSrEUgPVXPnF8tAbFGiSjPwcDOGQcoBFkB+ 3OtSPRNVbBamOBrfT3H9cxpTK59wEol7XVP3keTab4YcyFNu8cnAHkMpVI2EHg4R/b8o YTfvMXC0SmY+49H7wTqlQSLx9gM4HIMDI+/3VmN7ZZ5VogDH9zD/+0TSqkX+kVcwsljA 3TzNryq70vtTmtbfQeNB0KLAAwd0kf27CGTH7NwgFPI9RIjntrBFReqWCThz69H2CdAH 3gHPn6eXdeODe6FQgjrx36C4djoYdNBT6XzaNy2iVNe8ZtcmfSoeMxnqT2Y9WvDz7f2K mUww== X-Gm-Message-State: ALoCoQmGALI4VUsF6GIGyY7rWaqYLz7In+scortiS75mPgsXdAlXnBChZfqHQ7qaz1Yo2eQeLXCn X-Received: by 10.68.216.230 with SMTP id ot6mr29214822pbc.3.1395766732771; Tue, 25 Mar 2014 09:58:52 -0700 (PDT) X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.104.117 with SMTP id z108ls286874qge.51.gmail; Tue, 25 Mar 2014 09:58:52 -0700 (PDT) X-Received: by 10.52.90.37 with SMTP id bt5mr20686465vdb.7.1395766732659; Tue, 25 Mar 2014 09:58:52 -0700 (PDT) Received: from mail-vc0-f171.google.com (mail-vc0-f171.google.com [209.85.220.171]) by mx.google.com with ESMTPS id sv2si3952879vdc.165.2014.03.25.09.58.52 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 25 Mar 2014 09:58:52 -0700 (PDT) Received-SPF: neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=209.85.220.171; Received: by mail-vc0-f171.google.com with SMTP id lg15so936203vcb.30 for ; Tue, 25 Mar 2014 09:58:52 -0700 (PDT) X-Received: by 10.52.164.237 with SMTP id yt13mr25510877vdb.18.1395766732579; Tue, 25 Mar 2014 09:58:52 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp320444vck; Tue, 25 Mar 2014 09:58:52 -0700 (PDT) X-Received: by 10.229.221.1 with SMTP id ia1mr48836849qcb.6.1395766731812; Tue, 25 Mar 2014 09:58:51 -0700 (PDT) Received: from lists.xen.org (lists.xen.org. [50.57.142.19]) by mx.google.com with ESMTPS id j62si8740299qgf.41.2014.03.25.09.58.51 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Tue, 25 Mar 2014 09:58:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of xen-devel-bounces@lists.xen.org designates 50.57.142.19 as permitted sender) client-ip=50.57.142.19; Received: from localhost ([127.0.0.1] helo=lists.xen.org) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WSUeu-0001Do-4i; Tue, 25 Mar 2014 16:57:04 +0000 Received: from mail6.bemta5.messagelabs.com ([195.245.231.135]) by lists.xen.org with esmtp (Exim 4.72) (envelope-from ) id 1WSUep-00012T-2d for xen-devel@lists.xenproject.org; Tue, 25 Mar 2014 16:56:59 +0000 Received: from [85.158.139.211:31783] by server-10.bemta-5.messagelabs.com id 0A/CF-27081-A55B1335; Tue, 25 Mar 2014 16:56:58 +0000 X-Env-Sender: julien.grall@linaro.org X-Msg-Ref: server-3.tower-206.messagelabs.com!1395766617!3267819!1 X-Originating-IP: [74.125.83.54] X-SpamReason: No, hits=0.0 required=7.0 tests= X-StarScan-Received: X-StarScan-Version: 6.11.1; banners=-,-,- X-VirusChecked: Checked Received: (qmail 22112 invoked from network); 25 Mar 2014 16:56:57 -0000 Received: from mail-ee0-f54.google.com (HELO mail-ee0-f54.google.com) (74.125.83.54) by server-3.tower-206.messagelabs.com with RC4-SHA encrypted SMTP; 25 Mar 2014 16:56:57 -0000 Received: by mail-ee0-f54.google.com with SMTP id d49so676057eek.41 for ; Tue, 25 Mar 2014 09:56:57 -0700 (PDT) X-Received: by 10.15.67.142 with SMTP id u14mr31949785eex.19.1395766617258; Tue, 25 Mar 2014 09:56:57 -0700 (PDT) Received: from belegaer.uk.xensource.com. ([185.25.64.249]) by mx.google.com with ESMTPSA id h47sm33377501eey.13.2014.03.25.09.56.55 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 25 Mar 2014 09:56:56 -0700 (PDT) From: Julien Grall To: xen-devel@lists.xenproject.org Date: Tue, 25 Mar 2014 16:55:40 +0000 Message-Id: <1395766541-23979-34-git-send-email-julien.grall@linaro.org> X-Mailer: git-send-email 1.7.10.4 In-Reply-To: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> References: <1395766541-23979-1-git-send-email-julien.grall@linaro.org> Cc: ian.campbell@citrix.com, Stefano Stabellini , tim@xen.org, Julien Grall , Ian Jackson , stefano.stabellini@citrix.com Subject: [Xen-devel] [PATCH 33/34] tools/libxl: libxl__json_object_to_yajl_gen should return yajl_gen_status X-BeenThere: xen-devel@lists.xen.org X-Mailman-Version: 2.1.13 Precedence: list List-Id: List-Unsubscribe: , List-Post: , List-Help: , List-Subscribe: , MIME-Version: 1.0 Sender: xen-devel-bounces@lists.xen.org Errors-To: xen-devel-bounces@lists.xen.org X-Removed-Original-Auth: Dkim didn't pass. X-Original-Sender: julien.grall@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 209.85.220.171 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org Mailing-list: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org X-Google-Group-Id: 836684582541 List-Archive: 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 Cc: Ian Jackson Cc: Stefano Stabellini Cc: Ian Campbell --- tools/libxl/libxl_internal.h | 2 +- tools/libxl/libxl_json.c | 18 +++++++++--------- 2 files changed, 10 insertions(+), 10 deletions(-) diff --git a/tools/libxl/libxl_internal.h b/tools/libxl/libxl_internal.h index b3a200d..bfefd31 100644 --- a/tools/libxl/libxl_internal.h +++ b/tools/libxl/libxl_internal.h @@ -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, diff --git a/tools/libxl/libxl_json.c b/tools/libxl/libxl_json.c index d2f7de8..8e28c58 100644 --- a/tools/libxl/libxl_json.c +++ b/tools/libxl/libxl_json.c @@ -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);