40 lines
1.4 KiB
Diff
40 lines
1.4 KiB
Diff
|
|
From 1941593585574849dd72c458535cd80b4d858266 Mon Sep 17 00:00:00 2001
|
||
|
|
From: "Richard W.M. Jones" <rjones@redhat.com>
|
||
|
|
Date: Fri, 10 Dec 2021 10:20:34 +0000
|
||
|
|
Subject: [PATCH] Disable OCaml warning 6 completely
|
||
|
|
|
||
|
|
Warning 6 "labels-omitted" is not useful. It's fine to omit labels on
|
||
|
|
positional arguments.
|
||
|
|
|
||
|
|
Example:
|
||
|
|
|
||
|
|
File "perl_edit.ml", line 30, characters 2-13:
|
||
|
|
30 | c_edit_file (verbose ()) g (Guestfs.c_pointer g) file expr
|
||
|
|
^^^^^^^^^^^
|
||
|
|
Warning 6 [labels-omitted]: label verbose was omitted in the application of this function.
|
||
|
|
|
||
|
|
The function is specified as:
|
||
|
|
|
||
|
|
external c_edit_file : verbose:bool -> Guestfs.t -> int64 -> string -> string -> unit
|
||
|
|
|
||
|
|
The complaint is that the verbose: label has been omitted from the
|
||
|
|
first argument when the function is called, but IMO this is a
|
||
|
|
stylistic thing, not a bug.
|
||
|
|
|
||
|
|
(cherry picked from
|
||
|
|
guestfs-tools commit 577f7aee4b1c720f4c4826115b49a0c3870b149e)
|
||
|
|
|
||
|
|
diff --git a/m4/guestfs-ocaml.m4 b/m4/guestfs-ocaml.m4
|
||
|
|
index 3c504ce..5604574 100644
|
||
|
|
--- a/m4/guestfs-ocaml.m4
|
||
|
|
+++ b/m4/guestfs-ocaml.m4
|
||
|
|
@@ -222,7 +222,7 @@ AS_IF([test "x$have_Hivex_OPEN_UNSAFE" = "xno"],[
|
||
|
|
AC_SUBST([HIVEX_OPEN_UNSAFE_FLAG])
|
||
|
|
|
||
|
|
dnl Flags we want to pass to every OCaml compiler call.
|
||
|
|
-OCAML_WARN_ERROR="-warn-error CDEFLMPSUVYZX+52-3"
|
||
|
|
+OCAML_WARN_ERROR="-warn-error CDEFLMPSUVYZX+52-3 -w -6"
|
||
|
|
AC_SUBST([OCAML_WARN_ERROR])
|
||
|
|
OCAML_FLAGS="-g -annot $safe_string_option"
|
||
|
|
AC_SUBST([OCAML_FLAGS])
|