From nobody Fri Apr 26 11:18:36 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) client-ip=192.237.175.120; envelope-from=xen-devel-bounces@lists.xenproject.org; helo=lists.xenproject.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail(p=none dis=none) header.from=bitdefender.com ARC-Seal: i=1; a=rsa-sha256; t=1572045748; cv=none; d=zoho.com; s=zohoarc; b=d4CTkYawHooPa4U8trK2kH2Kq9lAuHVhBPSTyYPlvRoPt3JH8a7ipOQeTusCYuBVF4+EZbLrEVeyWSJtIIdRE8eAQih8WhZdj1wLNqr91ZQoHIIQG9dtP79omiYZRYAtEDiBeLCg2qxv5VfePLfnx9rlYDObzoNW5sL7yFOG9sA= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zoho.com; s=zohoarc; t=1572045748; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:List-Subscribe:List-Post:List-Id:List-Help:List-Unsubscribe:MIME-Version:Message-ID:Sender:Subject:To; bh=IdupAv8XTHv174snWreTOE4Gsukcd+4DuQt2hC7BNGA=; b=mMVTVxpUDPlaeIYNx6XzdSLSkPT2wV+Z2S0JK+iIP7mpTANgiko/mQ3DKav3aYviYX0B1W3YHP6dqfS6m7mzPuhrOvikPrlZL8+ExUMZsjvieOIStgHp6BOett119TqFTScEnvio99Bxkm+3XwAwfweHoptzWSmW2lOwCNuF5lc= ARC-Authentication-Results: i=1; mx.zoho.com; spf=none (zoho.com: 192.237.175.120 is neither permitted nor denied by domain of lists.xenproject.org) smtp.mailfrom=xen-devel-bounces@lists.xenproject.org; dmarc=fail header.from= (p=none dis=none) header.from= Return-Path: Received: from lists.xenproject.org (lists.xenproject.org [192.237.175.120]) by mx.zohomail.com with SMTPS id 1572045748535804.4761594414996; Fri, 25 Oct 2019 16:22:28 -0700 (PDT) Received: from localhost ([127.0.0.1] helo=lists.xenproject.org) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iO8tP-00074x-IV; Fri, 25 Oct 2019 23:21:15 +0000 Received: from us1-rack-iad1.inumbo.com ([172.99.69.81]) by lists.xenproject.org with esmtp (Exim 4.89) (envelope-from ) id 1iO8tO-00074s-D2 for xen-devel@lists.xenproject.org; Fri, 25 Oct 2019 23:21:14 +0000 Received: from mx01.bbu.dsd.mx.bitdefender.com (unknown [91.199.104.161]) by us1-rack-iad1.inumbo.com (Halon) with ESMTPS id 2238841a-f77e-11e9-beca-bc764e2007e4; Fri, 25 Oct 2019 23:21:13 +0000 (UTC) Received: from smtp.bitdefender.com (smtp02.buh.bitdefender.net [10.17.80.76]) by mx01.bbu.dsd.mx.bitdefender.com (Postfix) with ESMTPS id C68C0306E47C; Sat, 26 Oct 2019 02:21:11 +0300 (EEST) Received: from bitdefender.com (unknown [195.189.155.70]) by smtp.bitdefender.com (Postfix) with ESMTPSA id A8B57303442B; Sat, 26 Oct 2019 02:21:11 +0300 (EEST) X-Inumbo-ID: 2238841a-f77e-11e9-beca-bc764e2007e4 From: Petre Pircalabu To: xen-devel@lists.xenproject.org Date: Sat, 26 Oct 2019 02:21:10 +0300 Message-Id: X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [Xen-devel] [PATCH] tools/ocaml: Fix build error with Arch Linux X-BeenThere: xen-devel@lists.xenproject.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Xen developer discussion List-Unsubscribe: , List-Post: List-Help: List-Subscribe: , Cc: Petre Pircalabu , Ian Jackson , Christian Lindig , Wei Liu , David Scott Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Errors-To: xen-devel-bounces@lists.xenproject.org Sender: "Xen-devel" gcc (GCC) 9.2.0 complains: xentoollog_stubs.c: In function =E2=80=98stub_xtl_ocaml_vmessage=E2=80=99: xentoollog_stubs.c:93:16: error: initialization discards =E2=80=98const=E2= =80=99 qualifier from pointer target type [-Werror=3Ddiscarded-qualifiers] 93 | value *func =3D caml_named_value(xtl->vmessage_cb) ; | ^~~~~~~~~~~~~~~~ Signed-off-by: Petre Pircalabu Reviewed-by: Anthony PERARD --- tools/ocaml/libs/xentoollog/xentoollog_stubs.c | 4 ++-- tools/ocaml/libs/xl/xenlight_stubs.c | 20 ++++++++++---------- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/tools/ocaml/libs/xentoollog/xentoollog_stubs.c b/tools/ocaml/l= ibs/xentoollog/xentoollog_stubs.c index aadc3d1..1f73f26 100644 --- a/tools/ocaml/libs/xentoollog/xentoollog_stubs.c +++ b/tools/ocaml/libs/xentoollog/xentoollog_stubs.c @@ -90,7 +90,7 @@ static void stub_xtl_ocaml_vmessage(struct xentoollog_log= ger *logger, CAMLparam0(); CAMLlocalN(args, 4); struct caml_xtl *xtl =3D (struct caml_xtl*)logger; - value *func =3D caml_named_value(xtl->vmessage_cb) ; + const value *func =3D caml_named_value(xtl->vmessage_cb) ; char *msg; =20 if (func =3D=3D NULL) @@ -120,7 +120,7 @@ static void stub_xtl_ocaml_progress(struct xentoollog_l= ogger *logger, CAMLparam0(); CAMLlocalN(args, 5); struct caml_xtl *xtl =3D (struct caml_xtl*)logger; - value *func =3D caml_named_value(xtl->progress_cb) ; + const value *func =3D caml_named_value(xtl->progress_cb) ; =20 if (func =3D=3D NULL) caml_raise_sys_error(caml_copy_string("Unable to find callback")); diff --git a/tools/ocaml/libs/xl/xenlight_stubs.c b/tools/ocaml/libs/xl/xen= light_stubs.c index ff16b87..1181971 100644 --- a/tools/ocaml/libs/xl/xenlight_stubs.c +++ b/tools/ocaml/libs/xl/xenlight_stubs.c @@ -75,7 +75,7 @@ static void failwith_xl(int error, char *fname) { CAMLparam0(); CAMLlocal1(arg); - static value *exc =3D NULL; + static const value *exc =3D NULL; =20 /* First time around, lookup by name */ if (!exc) @@ -424,7 +424,7 @@ void async_callback(libxl_ctx *ctx, int rc, void *for_c= allback) caml_leave_blocking_section(); CAMLparam0(); CAMLlocal2(error, tmp); - static value *func =3D NULL; + static const value *func =3D NULL; value *p =3D (value *) for_callback; =20 if (func =3D=3D NULL) { @@ -1133,7 +1133,7 @@ value stub_libxl_xen_console_read_start(value ctx, va= lue clear) =20 static void raise_eof(void) { - static value *exc =3D NULL; + static const value *exc =3D NULL; =20 /* First time around, lookup by name */ if (!exc) @@ -1274,7 +1274,7 @@ int fd_register(void *user, int fd, void **for_app_re= gistration_out, CAMLparam0(); CAMLlocalN(args, 4); int ret =3D 0; - static value *func =3D NULL; + static const value *func =3D NULL; value *p =3D (value *) user; value *for_app; =20 @@ -1317,7 +1317,7 @@ int fd_modify(void *user, int fd, void **for_app_regi= stration_update, CAMLparam0(); CAMLlocalN(args, 4); int ret =3D 0; - static value *func =3D NULL; + static const value *func =3D NULL; value *p =3D (value *) user; value *for_app =3D *for_app_registration_update; =20 @@ -1356,7 +1356,7 @@ void fd_deregister(void *user, int fd, void *for_app_= registration) caml_leave_blocking_section(); CAMLparam0(); CAMLlocalN(args, 3); - static value *func =3D NULL; + static const value *func =3D NULL; value *p =3D (value *) user; value *for_app =3D for_app_registration; =20 @@ -1398,7 +1398,7 @@ int timeout_register(void *user, void **for_app_regis= tration_out, CAMLlocal2(sec, usec); CAMLlocalN(args, 4); int ret =3D 0; - static value *func =3D NULL; + static const value *func =3D NULL; value *p =3D (value *) user; struct timeout_handles *handles; =20 @@ -1450,7 +1450,7 @@ int timeout_modify(void *user, void **for_app_registr= ation_update, CAMLlocal1(for_app_update); CAMLlocalN(args, 2); int ret =3D 0; - static value *func =3D NULL; + static const value *func =3D NULL; value *p =3D (value *) user; struct timeout_handles *handles =3D *for_app_registration_update; =20 @@ -1566,7 +1566,7 @@ void event_occurs(void *user, libxl_event *event) CAMLparam0(); CAMLlocalN(args, 2); struct user_with_ctx *c_user =3D (struct user_with_ctx *) user; - static value *func =3D NULL; + static const value *func =3D NULL; =20 if (func =3D=3D NULL) { /* First time around, lookup by name */ @@ -1589,7 +1589,7 @@ void disaster(void *user, libxl_event_type type, CAMLparam0(); CAMLlocalN(args, 4); struct user_with_ctx *c_user =3D (struct user_with_ctx *) user; - static value *func =3D NULL; + static const value *func =3D NULL; =20 if (func =3D=3D NULL) { /* First time around, lookup by name */ --=20 2.7.4 _______________________________________________ Xen-devel mailing list Xen-devel@lists.xenproject.org https://lists.xenproject.org/mailman/listinfo/xen-devel