From 429764f7601999c46ff7c0cdafea8a3301a105d8 Mon Sep 17 00:00:00 2001 From: "kfraser@localhost.localdomain" Date: Wed, 25 Oct 2006 15:25:13 +0100 Subject: [LIBXC] Add -Wmissing-prototypes to CFLAGS, fix warnings resulting from that. Signed-off-by: Gerd Hoffmann --- 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(-) (limited to 'tools') diff --git a/tools/libxc/Makefile b/tools/libxc/Makefile index b5e61af64d..129b867ff6 100644 --- a/tools/libxc/Makefile +++ b/tools/libxc/Makefile @@ -31,7 +31,7 @@ GUEST_SRCS-$(CONFIG_HVM) += xc_hvm_build.c -include $(XEN_TARGET_ARCH)/Makefile -CFLAGS += -Werror +CFLAGS += -Werror -Wmissing-prototypes CFLAGS += -fno-strict-aliasing CFLAGS += $(INCLUDES) -I. diff --git a/tools/libxc/xc_linux_build.c b/tools/libxc/xc_linux_build.c index 822e55601b..e215d7e198 100644 --- a/tools/libxc/xc_linux_build.c +++ b/tools/libxc/xc_linux_build.c @@ -128,7 +128,7 @@ static int probeimageformat(const char *image, 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 --git a/tools/libxc/xc_linux_restore.c b/tools/libxc/xc_linux_restore.c index 6e323340e3..e4bd09ed19 100644 --- a/tools/libxc/xc_linux_restore.c +++ b/tools/libxc/xc_linux_restore.c @@ -57,7 +57,7 @@ read_exact(int fd, void *buf, size_t count) ** 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 --git a/tools/libxc/xc_linux_save.c b/tools/libxc/xc_linux_save.c index d955072726..7a5e4eaad6 100644 --- a/tools/libxc/xc_linux_save.c +++ b/tools/libxc/xc_linux_save.c @@ -413,7 +413,7 @@ static int suspend_and_state(int (*suspend)(int), int xc_handle, int io_fd, ** 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 --git a/tools/libxc/xc_private.c b/tools/libxc/xc_private.c index aea9cd78d8..768cf5c5cf 100644 --- a/tools/libxc/xc_private.c +++ b/tools/libxc/xc_private.c @@ -6,6 +6,7 @@ #include #include "xc_private.h" +#include "xg_private.h" int lock_pages(void *addr, size_t len) { @@ -35,23 +36,6 @@ int xc_get_pfn_type_batch(int xc_handle, 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( int xc_handle, struct mmuext_op *op, -- cgit v1.2.3