Blame SOURCES/0001-Remove-unused-not_supported-function.patch

ca920e
From 8853f5a49587f00a7d2a5c8c7e52480a16bbdb02 Mon Sep 17 00:00:00 2001
ca920e
From: "Richard W.M. Jones" <rjones@redhat.com>
ca920e
Date: Fri, 5 Feb 2016 16:28:34 +0000
ca920e
Subject: [PATCH] Remove unused 'not_supported' function.
ca920e
ca920e
Found by compiling under GCC 6.  The warning was:
ca920e
ca920e
In file included from libvirt_c.c:2058:0:
ca920e
libvirt_c_epilogue.c:89:1: error: 'not_supported' defined but not used [-Werror=unused-function]
ca920e
 not_supported (const char *fn)
ca920e
 ^~~~~~~~~~~~~
ca920e
---
ca920e
 libvirt/libvirt_c_epilogue.c | 15 ---------------
ca920e
 libvirt/libvirt_c_prologue.c |  1 -
ca920e
 2 files changed, 16 deletions(-)
ca920e
ca920e
diff --git a/libvirt/libvirt_c_epilogue.c b/libvirt/libvirt_c_epilogue.c
ca920e
index 4972e50..fa592c9 100644
ca920e
--- a/libvirt/libvirt_c_epilogue.c
ca920e
+++ b/libvirt/libvirt_c_epilogue.c
ca920e
@@ -84,21 +84,6 @@ _raise_virterror (const char *fn)
ca920e
   (void) caml__frame;
ca920e
 }
ca920e
 
ca920e
-/* Raise an error if a function is not supported. */
ca920e
-static void
ca920e
-not_supported (const char *fn)
ca920e
-{
ca920e
-  CAMLparam0 ();
ca920e
-  CAMLlocal1 (fnv);
ca920e
-
ca920e
-  fnv = caml_copy_string (fn);
ca920e
-  caml_raise_with_arg (*caml_named_value ("ocaml_libvirt_not_supported"), fnv);
ca920e
-
ca920e
-  /*NOTREACHED*/
ca920e
-  /* Suppresses a compiler warning. */
ca920e
-  (void) caml__frame;
ca920e
-}
ca920e
-
ca920e
 /* Convert the virErrorNumber, virErrorDomain and virErrorLevel enums
ca920e
  * into values (longs because they are variants in OCaml).
ca920e
  *
ca920e
diff --git a/libvirt/libvirt_c_prologue.c b/libvirt/libvirt_c_prologue.c
ca920e
index bf972e9..710c0d6 100644
ca920e
--- a/libvirt/libvirt_c_prologue.c
ca920e
+++ b/libvirt/libvirt_c_prologue.c
ca920e
@@ -25,7 +25,6 @@ typedef value (*Val_ptr_t) (void *);
ca920e
 static value Val_opt (void *ptr, Val_ptr_t Val_ptr);
ca920e
 /*static value option_default (value option, value deflt);*/
ca920e
 static void _raise_virterror (const char *fn) Noreturn;
ca920e
-static void not_supported (const char *fn) Noreturn;
ca920e
 static value Val_virterror (virErrorPtr err);
ca920e
 
ca920e
 /* Use this around synchronous libvirt API calls to release the OCaml
ca920e
-- 
ca920e
2.5.0
ca920e