aboutsummaryrefslogtreecommitdiffstats
path: root/testing/ocaml-libvirt/0001-Use-g-warn-error.patch
diff options
context:
space:
mode:
authorFernando Casas Schössow <casasfernando@outlook.com>2019-02-06 23:33:01 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2019-03-05 12:54:54 +0000
commit13eb3c75a32d19722717a47b6b3f1a413ba7a51e (patch)
treef9c92607d0b9cd46429fc231848f30ca4ac59cf5 /testing/ocaml-libvirt/0001-Use-g-warn-error.patch
parent73847a9fc802eb60f79eef2a7c7096fc518ad1b4 (diff)
downloadaports-13eb3c75a32d19722717a47b6b3f1a413ba7a51e.tar.bz2
aports-13eb3c75a32d19722717a47b6b3f1a413ba7a51e.tar.xz
testing/ocaml-libvirt: new aport
http://libvirt.org/ocaml/ OCaml binding for libvirt
Diffstat (limited to 'testing/ocaml-libvirt/0001-Use-g-warn-error.patch')
-rw-r--r--testing/ocaml-libvirt/0001-Use-g-warn-error.patch78
1 files changed, 78 insertions, 0 deletions
diff --git a/testing/ocaml-libvirt/0001-Use-g-warn-error.patch b/testing/ocaml-libvirt/0001-Use-g-warn-error.patch
new file mode 100644
index 0000000000..7c6bf35a54
--- /dev/null
+++ b/testing/ocaml-libvirt/0001-Use-g-warn-error.patch
@@ -0,0 +1,78 @@
+From 2ba6898b4dc121b00078e36d5416b3caadd5d05e Mon Sep 17 00:00:00 2001
+From: "Richard W.M. Jones" <rjones@redhat.com>
+Date: Mon, 27 Mar 2017 14:12:50 +0100
+Subject: [PATCH 1/5] Use -g -warn-error.
+
+Use -g for ocamlopt. ocamlopt has supported generating DWARF
+information for quite a long time.
+
+Also use -warn-error with the same set of warnings as is used
+by libguestfs.
+
+Fix a warning in examples/get_cpu_stats.ml found by enabling
+-warn-error.
+---
+ examples/Makefile.in | 4 ++--
+ examples/get_cpu_stats.ml | 2 ++
+ libvirt/Makefile.in | 6 +++---
+ 3 files changed, 7 insertions(+), 5 deletions(-)
+
+diff --git a/examples/Makefile.in b/examples/Makefile.in
+index 041e382..46006a0 100644
+--- a/examples/Makefile.in
++++ b/examples/Makefile.in
+@@ -18,10 +18,10 @@
+ OCAMLFIND = @OCAMLFIND@
+
+ OCAMLCPACKAGES := -package unix -I ../libvirt
+-OCAMLCFLAGS := -g
++OCAMLCFLAGS := -g -warn-error CDEFLMPSUVYZX-3
+ OCAMLCLIBS := -linkpkg
+ OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
+-OCAMLOPTFLAGS :=
++OCAMLOPTFLAGS := -g -warn-error CDEFLMPSUVYZX-3
+ OCAMLOPTLIBS := $(OCAMLCLIBS)
+
+ export LIBRARY_PATH=../libvirt
+diff --git a/examples/get_cpu_stats.ml b/examples/get_cpu_stats.ml
+index d7a8d0c..814c85e 100644
+--- a/examples/get_cpu_stats.ml
++++ b/examples/get_cpu_stats.ml
+@@ -19,9 +19,11 @@ let () =
+
+ let conn = C.connect_readonly () in
+
++ (*
+ let nr_pcpus =
+ let info = C.get_node_info conn in
+ C.maxcpus_of_node_info info in
++ *)
+
+ let stats =
+ let dom = D.lookup_by_name conn domname in
+diff --git a/libvirt/Makefile.in b/libvirt/Makefile.in
+index f7c04bb..cf614fc 100644
+--- a/libvirt/Makefile.in
++++ b/libvirt/Makefile.in
+@@ -31,15 +31,15 @@ OCAMLMKLIB = @OCAMLMKLIB@
+
+ ifneq ($(OCAMLFIND),)
+ OCAMLCPACKAGES := -package unix
+-OCAMLCFLAGS := -g
++OCAMLCFLAGS := -g -warn-error CDEFLMPSUVYZX-3
+ OCAMLCLIBS := -linkpkg
+ else
+ OCAMLCINCS :=
+-OCAMLCFLAGS := -g
++OCAMLCFLAGS := -g -warn-error CDEFLMPSUVYZX-3
+ OCAMLCLIBS := unix.cma
+ endif
+
+-OCAMLOPTFLAGS :=
++OCAMLOPTFLAGS := $(OCAMLCFLAGS)
+ ifneq ($(OCAMLFIND),)
+ OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
+ OCAMLOPTLIBS := $(OCAMLCLIBS)
+--
+2.9.3
+