All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Edwin Török" <edvin.torok@citrix.com>
To: <xen-devel@lists.xenproject.org>
Cc: "Edwin Török" <edvin.torok@citrix.com>,
	"Christian Lindig" <christian.lindig@citrix.com>,
	"David Scott" <dave@recoil.org>, "Wei Liu" <wl@xen.org>,
	"Anthony PERARD" <anthony.perard@citrix.com>
Subject: [PATCH v1 5/7] tools/ocaml: fix compiler warnings
Date: Fri, 29 Jul 2022 18:53:28 +0100	[thread overview]
Message-ID: <23dcc916bff25d0545c167833d99aa73b8a4c8da.1659116941.git.edvin.torok@citrix.com> (raw)
In-Reply-To: <cover.1659116941.git.edvin.torok@citrix.com>

Fix compiler warning about:
* unused value
* ambiguous documentation comment
* non-principal type inference (compiler version dependent)

No functional change.

Signed-off-by: Edwin Török <edvin.torok@citrix.com>
---
 tools/ocaml/xenstored/connection.ml | 2 +-
 tools/ocaml/xenstored/process.ml    | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/ocaml/xenstored/connection.ml b/tools/ocaml/xenstored/connection.ml
index 65f99ea6f2..a94d47cdc2 100644
--- a/tools/ocaml/xenstored/connection.ml
+++ b/tools/ocaml/xenstored/connection.ml
@@ -313,7 +313,7 @@ let is_bad con = match con.dom with None -> false | Some dom -> Domain.is_bad_do
 let has_extra_connection_data con =
 	let has_in = has_input con || has_partial_input con in
 	let has_out = has_output con in
-	let has_socket = con.dom = None in
+	let _has_socket = con.dom = None in
 	let has_nondefault_perms = make_perm con.dom <> con.perm in
 	has_in || has_out
 	(* TODO: what about SIGTERM, should use systemd to store FDS
diff --git a/tools/ocaml/xenstored/process.ml b/tools/ocaml/xenstored/process.ml
index 27790d4a5c..86eed02413 100644
--- a/tools/ocaml/xenstored/process.ml
+++ b/tools/ocaml/xenstored/process.ml
@@ -59,7 +59,7 @@ let split_one_path data con =
 
 let process_watch t cons =
 	let oldroot = t.Transaction.oldroot in
-	let newroot = Store.get_root t.store in
+	let newroot = Store.get_root t.Transaction.store in
 	let ops = Transaction.get_paths t |> List.rev in
 	let do_op_watch op cons =
 		let recurse, oldroot, root = match (fst op) with
@@ -491,7 +491,7 @@ let transaction_replay c t doms cons =
 			ignore @@ Connection.end_transaction c tid None
 		)
 
-let do_watch con t _domains cons data =
+let do_watch con _t _domains cons data =
 	let (node, token) =
 		match (split None '\000' data) with
 		| [node; token; ""]   -> node, token
@@ -651,6 +651,7 @@ let maybe_ignore_transaction = function
 
 
 let () = Printexc.record_backtrace true
+
 (**
  * Nothrow guarantee.
  *)
-- 
2.34.1



  parent reply	other threads:[~2022-07-29 17:54 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-29 17:53 [PATCH v1 0/7] tools/ocaml code and build cleanups Edwin Török
2022-07-29 17:53 ` [PATCH v1 1/7] tools/ocaml/Makefile: do not run ocamldep during make clean Edwin Török
2022-08-01  8:19   ` Christian Lindig
2022-08-03 10:16   ` Jan Beulich
2022-08-03 10:24     ` Edwin Torok
2022-08-03 10:47       ` Jan Beulich
2022-08-03 10:57       ` Anthony PERARD
2022-08-03 11:58         ` Jan Beulich
2022-08-03 12:42           ` Anthony PERARD
2022-07-29 17:53 ` [PATCH v1 2/7] tools/ocaml/*/Makefile: generate paths.ml from configure Edwin Török
2022-08-01  8:25   ` Christian Lindig
2022-08-03 10:37   ` Andrew Cooper
2022-07-29 17:53 ` [PATCH v1 3/7] tools/ocaml/*/dune: dune based build system Edwin Török
2022-08-01 10:52   ` Christian Lindig
2022-08-03 11:25   ` Anthony PERARD
2022-08-03 12:22     ` Christian Lindig
2022-07-29 17:53 ` [PATCH v1 4/7] tools/ocaml: Makefile to drive dune Edwin Török
2022-08-03 13:46   ` Anthony PERARD
2022-08-03 15:37     ` Edwin Torok
2022-08-03 17:16       ` Anthony PERARD
2022-07-29 17:53 ` Edwin Török [this message]
2022-08-01  8:23   ` [PATCH v1 5/7] tools/ocaml: fix compiler warnings Christian Lindig
2022-08-03 10:39   ` Andrew Cooper
2022-08-03 10:47     ` Christian Lindig
2022-07-29 17:53 ` [PATCH v1 6/7] tools/ocaml/libs/xb: hide type of Xb.t Edwin Török
2022-07-29 17:53 ` [PATCH v1 7/7] tools/ocaml/libs/eventchn: do not leak event channels and OCaml 5.0 compat Edwin Török
2022-08-01  8:20   ` Christian Lindig
2022-08-05 18:06   ` Andrew Cooper
2022-08-08  8:28     ` Edwin Torok
2022-08-08  9:59       ` Andrew Cooper
2022-08-01 10:49 ` [PATCH v1 0/7] tools/ocaml code and build cleanups Christian Lindig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=23dcc916bff25d0545c167833d99aa73b8a4c8da.1659116941.git.edvin.torok@citrix.com \
    --to=edvin.torok@citrix.com \
    --cc=anthony.perard@citrix.com \
    --cc=christian.lindig@citrix.com \
    --cc=dave@recoil.org \
    --cc=wl@xen.org \
    --cc=xen-devel@lists.xenproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.