Displaying 2 results from an estimated 2 matches for "c3be84d".
2016 Dec 09
2
Re: [PATCH 2/2] v2v: Fix ambiguous and probably incorrect pattern match (warning 57).
On Thursday, 8 December 2016 13:54:04 CET Richard W.M. Jones wrote:
> See:
> http://caml.inria.fr/pub/docs/manual-ocaml/comp.html#ss%3Awarn57
>
> I believe the code as written previously was incorrect. However we
> are lucky because if neither clause matches then it will fall through
> to displaying an error message, allowing the user to correct the
> problem.
> ---
>
2016 Dec 09
0
Re: [PATCH 2/2] v2v: Fix ambiguous and probably incorrect pattern match (warning 57).
...v rest) in
>
> Rather than duplicating the (admittely small) code block, what about
> removing the slash before splitting, so there is no need for the
> separate match case handling the empty part?
Even better is ...
diff --git a/v2v/output_vdsm.ml b/v2v/output_vdsm.ml
index a78e3e6..c3be84d 100644
--- a/v2v/output_vdsm.ml
+++ b/v2v/output_vdsm.ml
@@ -81,10 +81,9 @@ object
let mp, uuid =
let fields = String.nsplit "/" os in (* ... "data-center" "UUID" *)
let fields = List.rev fields in (* "UUID" "data-center" ......