Minor tools/libxc bugfixes.
PATCH 1/1 Minor tools/libxc bugfixes.
Add -Wmissing-prototypes to CFLAGS, fix warnings resulting from that.
Signed-off-by Gerd Hoffmann <[email protected]>
--- 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 | 9 ++++++--- 5 files changed, 10 insertions(+), 7 deletions(-)
tools/libxc/xc_linux_restore.c +1 -1
@@ -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;
tools/libxc/xc_linux_save.c +1 -1
@@ -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) {
tools/libxc/xc_private.c +6 -3
@@ -6,6 +6,7 @@#include <inttypes.h> #include "xc_private.h" +#include "xg_private.h" /* NB: arr must be mlock'ed */ int xc_get_pfn_type_batch(int xc_handle,
@@ -19,10 +20,11 @@ int xc_get_pfn_type_batch(int xc_handle,return do_domctl (xc_handle, &domctl); } +#if 0 /* dead code ??? */ #define GETPFN_ERR (~0U) -unsigned int get_pfn_type (int xc_handle, -unsigned long mfn, -uint32_t dom) +static unsigned int get_pfn_type (int xc_handle, +unsigned long mfn, +uint32_t dom) {DECLARE_DOMCTL ; domctl.cmd = XEN_DOMCTL_getpageframeinfo;
@@ -35,6 +37,7 @@ unsigned int get_pfn_type(int xc_handle, }return domctl.u.getpageframeinfo.type; } +#endif int xc_mmuext_op( int xc_handle,
tools/libxc/Makefile +1 -1
@@ -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.
tools/libxc/xc_linux_build.c +1 -1
@@ -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)
--