ia64/xen-unstable

changeset 15285:b090c290d9f8

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@intel.com>
Signed-off-by: Keir Fraser <keir@xensource.com>
author kfraser@localhost.localdomain
date Thu Jun 07 11:02:23 2007 +0100 (2007-06-07)
parents 6d45351273da
children 9c2322a4c348
files tools/console/daemon/io.c tools/ioemu/target-i386-dm/exec-dm.c
line diff
     1.1 --- a/tools/console/daemon/io.c	Wed Jun 06 20:25:58 2007 +0100
     1.2 +++ b/tools/console/daemon/io.c	Thu Jun 07 11:02:23 2007 +0100
     1.3 @@ -183,7 +183,8 @@ static int create_domain_log(struct doma
     1.4  {
     1.5  	char logfile[PATH_MAX];
     1.6  	char *namepath, *data, *s;
     1.7 -	int fd, len;
     1.8 +	int fd;
     1.9 +	unsigned int len;
    1.10  
    1.11  	namepath = xs_get_domain_path(xs, dom->domid);
    1.12  	s = realloc(namepath, strlen(namepath) + 6);
     2.1 --- a/tools/ioemu/target-i386-dm/exec-dm.c	Wed Jun 06 20:25:58 2007 +0100
     2.2 +++ b/tools/ioemu/target-i386-dm/exec-dm.c	Thu Jun 07 11:02:23 2007 +0100
     2.3 @@ -448,18 +448,29 @@ extern unsigned long logdirty_bitmap_siz
     2.4  void memcpy_words(void *dst, void *src, size_t n)
     2.5  {
     2.6      while (n >= sizeof(long)) {
     2.7 -        *((long *)dst)++ = *((long *)src)++;
     2.8 +        *((long *)dst) = *((long *)src);
     2.9 +        dst = ((long *)dst) + 1;
    2.10 +        src = ((long *)src) + 1;
    2.11          n -= sizeof(long);
    2.12      }
    2.13  
    2.14 -    if (n & 4)
    2.15 -        *((uint32_t *)dst)++ = *((uint32_t *)src)++;
    2.16 +    if (n & 4) {
    2.17 +        *((uint32_t *)dst) = *((uint32_t *)src);
    2.18 +        dst = ((uint32_t *)dst) + 1;
    2.19 +        src = ((uint32_t *)src) + 1;
    2.20 +   }
    2.21  
    2.22 -    if (n & 2)
    2.23 -        *((uint16_t *)dst)++ = *((uint16_t *)src)++;
    2.24 +    if (n & 2) {
    2.25 +        *((uint16_t *)dst) = *((uint16_t *)src);
    2.26 +        dst = ((uint16_t *)dst) + 1;
    2.27 +        src = ((uint16_t *)src) + 1;
    2.28 +    }
    2.29  
    2.30 -    if (n & 1)
    2.31 -        *((uint8_t *)dst)++ = *((uint8_t *)src)++;
    2.32 +    if (n & 1) {
    2.33 +        *((uint8_t *)dst) = *((uint8_t *)src);
    2.34 +        dst = ((uint8_t *)dst) + 1;
    2.35 +        src = ((uint8_t *)src) + 1;
    2.36 +    }
    2.37  }
    2.38  
    2.39  void cpu_physical_memory_rw(target_phys_addr_t addr, uint8_t *buf,