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-changelog

[Xen-changelog] [xen-unstable] tools: Fix some type issues GCC 4.1.0 war

To: xen-changelog@xxxxxxxxxxxxxxxxxxx
Subject: [Xen-changelog] [xen-unstable] tools: Fix some type issues GCC 4.1.0 warnings.
From: Xen patchbot-unstable <patchbot-unstable@xxxxxxxxxxxxxxxxxxx>
Date: Mon, 11 Jun 2007 02:22:26 -0700
Delivery-date: Tue, 12 Jun 2007 05:07:25 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxx
List-help: <mailto:xen-changelog-request@lists.xensource.com?subject=help>
List-id: BK change log <xen-changelog.lists.xensource.com>
List-post: <mailto:xen-changelog@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/cgi-bin/mailman/listinfo/xen-changelog>, <mailto:xen-changelog-request@lists.xensource.com?subject=unsubscribe>
Reply-to: xen-devel@xxxxxxxxxxxxxxxxxxx
Sender: xen-changelog-bounces@xxxxxxxxxxxxxxxxxxx
# HG changeset patch
# User kfraser@xxxxxxxxxxxxxxxxxxxxx
# Date 1181210543 -3600
# Node ID b090c290d9f8fc579be32ddd68f2bcd96e05aa03
# Parent  6d45351273da0b49ed328ef8077446c4ceedf3ff
tools: Fix some type issues GCC 4.1.0 warnings.

FC5's gcc 4.1.0 can't make some files in tools/ due to its stronger
type checking.

From: Dexuan Cui <dexuan.cui@xxxxxxxxx>
Signed-off-by: Keir Fraser <keir@xxxxxxxxxxxxx>
---
 tools/console/daemon/io.c            |    3 ++-
 tools/ioemu/target-i386-dm/exec-dm.c |   29 ++++++++++++++++++++---------
 2 files changed, 22 insertions(+), 10 deletions(-)

diff -r 6d45351273da -r b090c290d9f8 tools/console/daemon/io.c
--- a/tools/console/daemon/io.c Wed Jun 06 20:25:58 2007 +0100
+++ b/tools/console/daemon/io.c Thu Jun 07 11:02:23 2007 +0100
@@ -183,7 +183,8 @@ static int create_domain_log(struct doma
 {
        char logfile[PATH_MAX];
        char *namepath, *data, *s;
-       int fd, len;
+       int fd;
+       unsigned int len;
 
        namepath = xs_get_domain_path(xs, dom->domid);
        s = realloc(namepath, strlen(namepath) + 6);
diff -r 6d45351273da -r b090c290d9f8 tools/ioemu/target-i386-dm/exec-dm.c
--- a/tools/ioemu/target-i386-dm/exec-dm.c      Wed Jun 06 20:25:58 2007 +0100
+++ b/tools/ioemu/target-i386-dm/exec-dm.c      Thu Jun 07 11:02:23 2007 +0100
@@ -448,18 +448,29 @@ void memcpy_words(void *dst, void *src, 
 void memcpy_words(void *dst, void *src, size_t n)
 {
     while (n >= sizeof(long)) {
-        *((long *)dst)++ = *((long *)src)++;
+        *((long *)dst) = *((long *)src);
+        dst = ((long *)dst) + 1;
+        src = ((long *)src) + 1;
         n -= sizeof(long);
     }
 
-    if (n & 4)
-        *((uint32_t *)dst)++ = *((uint32_t *)src)++;
-
-    if (n & 2)
-        *((uint16_t *)dst)++ = *((uint16_t *)src)++;
-
-    if (n & 1)
-        *((uint8_t *)dst)++ = *((uint8_t *)src)++;
+    if (n & 4) {
+        *((uint32_t *)dst) = *((uint32_t *)src);
+        dst = ((uint32_t *)dst) + 1;
+        src = ((uint32_t *)src) + 1;
+   }
+
+    if (n & 2) {
+        *((uint16_t *)dst) = *((uint16_t *)src);
+        dst = ((uint16_t *)dst) + 1;
+        src = ((uint16_t *)src) + 1;
+    }
+
+    if (n & 1) {
+        *((uint8_t *)dst) = *((uint8_t *)src);
+        dst = ((uint8_t *)dst) + 1;
+        src = ((uint8_t *)src) + 1;
+    }
 }
 
 void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf, 

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

<Prev in Thread] Current Thread [Next in Thread>
  • [Xen-changelog] [xen-unstable] tools: Fix some type issues GCC 4.1.0 warnings., Xen patchbot-unstable <=