Blame SOURCES/0001-Use-g-warn-error.patch

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