diff options
author | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-10-25 15:25:13 +0100 |
---|---|---|
committer | kfraser@localhost.localdomain <kfraser@localhost.localdomain> | 2006-10-25 15:25:13 +0100 |
commit | 429764f7601999c46ff7c0cdafea8a3301a105d8 (patch) | |
tree | 220ad06059ec8b257de8aa2429ed15587b8a6889 /tools | |
parent | 1213fabf9b03074097eccc60fd24a85171e47000 (diff) | |
download | xen-429764f7601999c46ff7c0cdafea8a3301a105d8.tar.gz xen-429764f7601999c46ff7c0cdafea8a3301a105d8.tar.bz2 xen-429764f7601999c46ff7c0cdafea8a3301a105d8.zip |
[LIBXC] Add -Wmissing-prototypes to CFLAGS, fix warnings resulting from that.
Signed-off-by: Gerd Hoffmann <kraxel@suse.de>
Diffstat (limited to 'tools')
-rw-r--r-- | tools/libxc/Makefile | 2 | ||||
-rw-r--r-- | tools/libxc/xc_linux_build.c | 2 | ||||
-rw-r--r-- | tools/libxc/xc_linux_restore.c | 2 | ||||
-rw-r--r-- | tools/libxc/xc_linux_save.c | 2 | ||||
-rw-r--r-- | tools/libxc/xc_private.c | 18 |
5 files changed, 5 insertions, 21 deletions
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 <inttypes.h> #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, |