WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-devel

[Xen-devel] [patch] Minor tools/libxc bugfixes.

To: xen-devel@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-devel] [patch] Minor tools/libxc bugfixes.
From: kraxel@xxxxxxx
Date: Fri, 20 Oct 2006 10:39:44 +0200
Delivery-date: Fri, 20 Oct 2006 09:33:48 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-devel-request@lists.xensource.com?subject=help>
List-id: Xen developer discussion <xen-devel.lists.xensource.com>
List-post: <mailto:xen-devel@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-devel>, <mailto:xen-devel-request@lists.xensource.com?subject=unsubscribe>
Sender: xen-devel-bounces@xxxxxxxxxxxxxxxxxxx
User-agent: quilt/0.44-15
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       |    9 ++++++---
 5 files changed, 10 insertions(+), 7 deletions(-)

Index: build-32-unstable-11822/tools/libxc/xc_linux_restore.c
===================================================================
--- build-32-unstable-11822.orig/tools/libxc/xc_linux_restore.c
+++ build-32-unstable-11822/tools/libxc/xc_linux_restore.c
@@ -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;
Index: build-32-unstable-11822/tools/libxc/xc_linux_save.c
===================================================================
--- build-32-unstable-11822.orig/tools/libxc/xc_linux_save.c
+++ build-32-unstable-11822/tools/libxc/xc_linux_save.c
@@ -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)
 {
 
Index: build-32-unstable-11822/tools/libxc/xc_private.c
===================================================================
--- build-32-unstable-11822.orig/tools/libxc/xc_private.c
+++ build-32-unstable-11822/tools/libxc/xc_private.c
@@ -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,
Index: build-32-unstable-11822/tools/libxc/Makefile
===================================================================
--- build-32-unstable-11822.orig/tools/libxc/Makefile
+++ build-32-unstable-11822/tools/libxc/Makefile
@@ -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.
 
Index: build-32-unstable-11822/tools/libxc/xc_linux_build.c
===================================================================
--- build-32-unstable-11822.orig/tools/libxc/xc_linux_build.c
+++ build-32-unstable-11822/tools/libxc/xc_linux_build.c
@@ -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)

--


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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-devel] [patch] Minor tools/libxc bugfixes., kraxel <=