[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Xen-changelog] [xen-unstable] [LIBXC] Add -Wmissing-prototypes to CFLAGS, fix warnings resulting from that.



# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Node ID 21905d2497d6782333e0ebad23b3164db7a0f270
# Parent  3db344ea80705478cef942254e5772c5739fafc9
[LIBXC] Add -Wmissing-prototypes to CFLAGS, fix warnings resulting from that.

Signed-off-by: Gerd Hoffmann <kraxel@xxxxxxx>
---
 tools/libxc/Makefile           |    2 +-
 tools/libxc/xc_linux_build.c   |    2 +-
 tools/libxc/xc_linux_restore.c |    2 +-
 tools/libxc/xc_linux_save.c    |    2 +-
 tools/libxc/xc_private.c       |   18 +-----------------
 5 files changed, 5 insertions(+), 21 deletions(-)

diff -r 3db344ea8070 -r 21905d2497d6 tools/libxc/Makefile
--- a/tools/libxc/Makefile      Wed Oct 25 15:17:40 2006 +0100
+++ b/tools/libxc/Makefile      Wed Oct 25 15:25:13 2006 +0100
@@ -31,7 +31,7 @@ GUEST_SRCS-$(CONFIG_HVM) += xc_hvm_build
 
 -include $(XEN_TARGET_ARCH)/Makefile
 
-CFLAGS   += -Werror
+CFLAGS   += -Werror -Wmissing-prototypes
 CFLAGS   += -fno-strict-aliasing
 CFLAGS   += $(INCLUDES) -I.
 
diff -r 3db344ea8070 -r 21905d2497d6 tools/libxc/xc_linux_build.c
--- a/tools/libxc/xc_linux_build.c      Wed Oct 25 15:17:40 2006 +0100
+++ b/tools/libxc/xc_linux_build.c      Wed Oct 25 15:25:13 2006 +0100
@@ -128,7 +128,7 @@ static int probeimageformat(const char *
     return 0;
 }
 
-int load_initrd(int xc_handle, domid_t dom,
+static int load_initrd(int xc_handle, domid_t dom,
                 struct initrd_info *initrd,
                 unsigned long physbase,
                 xen_pfn_t *phys_to_mach)
diff -r 3db344ea8070 -r 21905d2497d6 tools/libxc/xc_linux_restore.c
--- a/tools/libxc/xc_linux_restore.c    Wed Oct 25 15:17:40 2006 +0100
+++ b/tools/libxc/xc_linux_restore.c    Wed Oct 25 15:25:13 2006 +0100
@@ -57,7 +57,7 @@ read_exact(int fd, void *buf, size_t cou
 ** This function inverts that operation, replacing the pfn values with
 ** the (now known) appropriate mfn values.
 */
-int uncanonicalize_pagetable(unsigned long type, void *page)
+static int uncanonicalize_pagetable(unsigned long type, void *page)
 {
     int i, pte_last;
     unsigned long pfn;
diff -r 3db344ea8070 -r 21905d2497d6 tools/libxc/xc_linux_save.c
--- a/tools/libxc/xc_linux_save.c       Wed Oct 25 15:17:40 2006 +0100
+++ b/tools/libxc/xc_linux_save.c       Wed Oct 25 15:25:13 2006 +0100
@@ -413,7 +413,7 @@ static int suspend_and_state(int (*suspe
 ** which entries do not require canonicalization (in particular, those
 ** entries which map the virtual address reserved for the hypervisor).
 */
-int canonicalize_pagetable(unsigned long type, unsigned long pfn,
+static int canonicalize_pagetable(unsigned long type, unsigned long pfn,
                            const void *spage, void *dpage)
 {
 
diff -r 3db344ea8070 -r 21905d2497d6 tools/libxc/xc_private.c
--- a/tools/libxc/xc_private.c  Wed Oct 25 15:17:40 2006 +0100
+++ b/tools/libxc/xc_private.c  Wed Oct 25 15:25:13 2006 +0100
@@ -6,6 +6,7 @@
 
 #include <inttypes.h>
 #include "xc_private.h"
+#include "xg_private.h"
 
 int lock_pages(void *addr, size_t len)
 {
@@ -33,23 +34,6 @@ int xc_get_pfn_type_batch(int xc_handle,
     domctl.u.getpageframeinfo2.num    = num;
     set_xen_guest_handle(domctl.u.getpageframeinfo2.array, arr);
     return do_domctl(xc_handle, &domctl);
-}
-
-#define GETPFN_ERR (~0U)
-unsigned int get_pfn_type(int xc_handle,
-                          unsigned long mfn,
-                          uint32_t dom)
-{
-    DECLARE_DOMCTL;
-    domctl.cmd = XEN_DOMCTL_getpageframeinfo;
-    domctl.u.getpageframeinfo.gmfn   = mfn;
-    domctl.domain = (domid_t)dom;
-    if ( do_domctl(xc_handle, &domctl) < 0 )
-    {
-        PERROR("Unexpected failure when getting page frame info!");
-        return GETPFN_ERR;
-    }
-    return domctl.u.getpageframeinfo.type;
 }
 
 int xc_mmuext_op(

_______________________________________________
Xen-changelog mailing list
Xen-changelog@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-changelog


 


Rackspace

Lists.xenproject.org is hosted with RackSpace, monitoring our
servers 24x7x365 and backed by RackSpace's Fanatical Support®.