|
|
bda309 |
From 2ba6898b4dc121b00078e36d5416b3caadd5d05e Mon Sep 17 00:00:00 2001
|
|
|
bda309 |
From: "Richard W.M. Jones" <rjones@redhat.com>
|
|
|
bda309 |
Date: Mon, 27 Mar 2017 14:12:50 +0100
|
|
|
bda309 |
Subject: [PATCH 1/5] Use -g -warn-error.
|
|
|
bda309 |
|
|
|
bda309 |
Use -g for ocamlopt. ocamlopt has supported generating DWARF
|
|
|
bda309 |
information for quite a long time.
|
|
|
bda309 |
|
|
|
bda309 |
Also use -warn-error with the same set of warnings as is used
|
|
|
bda309 |
by libguestfs.
|
|
|
bda309 |
|
|
|
bda309 |
Fix a warning in examples/get_cpu_stats.ml found by enabling
|
|
|
bda309 |
-warn-error.
|
|
|
bda309 |
---
|
|
|
bda309 |
examples/Makefile.in | 4 ++--
|
|
|
bda309 |
examples/get_cpu_stats.ml | 2 ++
|
|
|
bda309 |
libvirt/Makefile.in | 6 +++---
|
|
|
bda309 |
3 files changed, 7 insertions(+), 5 deletions(-)
|
|
|
bda309 |
|
|
|
bda309 |
diff --git a/examples/Makefile.in b/examples/Makefile.in
|
|
|
bda309 |
index 041e382..46006a0 100644
|
|
|
bda309 |
--- a/examples/Makefile.in
|
|
|
bda309 |
+++ b/examples/Makefile.in
|
|
|
bda309 |
@@ -18,10 +18,10 @@
|
|
|
bda309 |
OCAMLFIND = @OCAMLFIND@
|
|
|
bda309 |
|
|
|
bda309 |
OCAMLCPACKAGES := -package unix -I ../libvirt
|
|
|
bda309 |
-OCAMLCFLAGS := -g
|
|
|
bda309 |
+OCAMLCFLAGS := -g -warn-error CDEFLMPSUVYZX-3
|
|
|
bda309 |
OCAMLCLIBS := -linkpkg
|
|
|
bda309 |
OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
|
|
|
bda309 |
-OCAMLOPTFLAGS :=
|
|
|
bda309 |
+OCAMLOPTFLAGS := -g -warn-error CDEFLMPSUVYZX-3
|
|
|
bda309 |
OCAMLOPTLIBS := $(OCAMLCLIBS)
|
|
|
bda309 |
|
|
|
bda309 |
export LIBRARY_PATH=../libvirt
|
|
|
bda309 |
diff --git a/examples/get_cpu_stats.ml b/examples/get_cpu_stats.ml
|
|
|
bda309 |
index d7a8d0c..814c85e 100644
|
|
|
bda309 |
--- a/examples/get_cpu_stats.ml
|
|
|
bda309 |
+++ b/examples/get_cpu_stats.ml
|
|
|
bda309 |
@@ -19,9 +19,11 @@ let () =
|
|
|
bda309 |
|
|
|
bda309 |
let conn = C.connect_readonly () in
|
|
|
bda309 |
|
|
|
bda309 |
+ (*
|
|
|
bda309 |
let nr_pcpus =
|
|
|
bda309 |
let info = C.get_node_info conn in
|
|
|
bda309 |
C.maxcpus_of_node_info info in
|
|
|
bda309 |
+ *)
|
|
|
bda309 |
|
|
|
bda309 |
let stats =
|
|
|
bda309 |
let dom = D.lookup_by_name conn domname in
|
|
|
bda309 |
diff --git a/libvirt/Makefile.in b/libvirt/Makefile.in
|
|
|
bda309 |
index f7c04bb..cf614fc 100644
|
|
|
bda309 |
--- a/libvirt/Makefile.in
|
|
|
bda309 |
+++ b/libvirt/Makefile.in
|
|
|
bda309 |
@@ -31,15 +31,15 @@ OCAMLMKLIB = @OCAMLMKLIB@
|
|
|
bda309 |
|
|
|
bda309 |
ifneq ($(OCAMLFIND),)
|
|
|
bda309 |
OCAMLCPACKAGES := -package unix
|
|
|
bda309 |
-OCAMLCFLAGS := -g
|
|
|
bda309 |
+OCAMLCFLAGS := -g -warn-error CDEFLMPSUVYZX-3
|
|
|
bda309 |
OCAMLCLIBS := -linkpkg
|
|
|
bda309 |
else
|
|
|
bda309 |
OCAMLCINCS :=
|
|
|
bda309 |
-OCAMLCFLAGS := -g
|
|
|
bda309 |
+OCAMLCFLAGS := -g -warn-error CDEFLMPSUVYZX-3
|
|
|
bda309 |
OCAMLCLIBS := unix.cma
|
|
|
bda309 |
endif
|
|
|
bda309 |
|
|
|
bda309 |
-OCAMLOPTFLAGS :=
|
|
|
bda309 |
+OCAMLOPTFLAGS := $(OCAMLCFLAGS)
|
|
|
bda309 |
ifneq ($(OCAMLFIND),)
|
|
|
bda309 |
OCAMLOPTPACKAGES := $(OCAMLCPACKAGES)
|
|
|
bda309 |
OCAMLOPTLIBS := $(OCAMLCLIBS)
|
|
|
bda309 |
--
|
|
|
bda309 |
2.9.3
|
|
|
bda309 |
|