diff options
author | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-14 12:17:59 +0000 |
---|---|---|
committer | j_mayer <j_mayer@c046a42c-6fe2-441c-8c8c-71466251a162> | 2007-04-14 12:17:59 +0000 |
commit | 1c5bf3bf8ce43924663e58f1c92708ac3e59272a (patch) | |
tree | abcc9b553c24e5ccb9e00ef3e677d0a1c28b8d5d | |
parent | e96efcfcb19b81d87ed3baec419b14cdd6e021a4 (diff) |
Fix incorrect pointers casts.
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2662 c046a42c-6fe2-441c-8c8c-71466251a162
-rw-r--r-- | linux-user/syscall.c | 2 | ||||
-rw-r--r-- | monitor.c | 16 |
2 files changed, 9 insertions, 9 deletions
diff --git a/linux-user/syscall.c b/linux-user/syscall.c index 7ab506dd3d..7f4f771695 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -3345,7 +3345,7 @@ long do_syscall(void *cpu_env, int num, long arg1, long arg2, long arg3, strncpy(tde->d_name, de->d_name, tnamelen); de = (struct dirent *)((char *)de + reclen); len -= reclen; - tde = (struct dirent *)((char *)tde + treclen); + tde = (struct target_dirent *)((char *)tde + treclen); count1 += treclen; } ret = count1; @@ -2116,9 +2116,9 @@ static void monitor_handle_command(const char *cmdline) } if (nb_args + 3 > MAX_ARGS) goto error_args; - args[nb_args++] = (void*)count; - args[nb_args++] = (void*)format; - args[nb_args++] = (void*)size; + args[nb_args++] = (void*)(long)count; + args[nb_args++] = (void*)(long)format; + args[nb_args++] = (void*)(long)size; } break; case 'i': @@ -2146,7 +2146,7 @@ static void monitor_handle_command(const char *cmdline) typestr++; if (nb_args >= MAX_ARGS) goto error_args; - args[nb_args++] = (void *)has_arg; + args[nb_args++] = (void *)(long)has_arg; if (!has_arg) { if (nb_args >= MAX_ARGS) goto error_args; @@ -2160,16 +2160,16 @@ static void monitor_handle_command(const char *cmdline) if (c == 'i') { if (nb_args >= MAX_ARGS) goto error_args; - args[nb_args++] = (void *)(int)val; + args[nb_args++] = (void *)(long)val; } else { if ((nb_args + 1) >= MAX_ARGS) goto error_args; #if TARGET_LONG_BITS == 64 - args[nb_args++] = (void *)(int)((val >> 32) & 0xffffffff); + args[nb_args++] = (void *)(long)((val >> 32) & 0xffffffff); #else args[nb_args++] = (void *)0; #endif - args[nb_args++] = (void *)(int)(val & 0xffffffff); + args[nb_args++] = (void *)(long)(val & 0xffffffff); } } break; @@ -2196,7 +2196,7 @@ static void monitor_handle_command(const char *cmdline) } if (nb_args >= MAX_ARGS) goto error_args; - args[nb_args++] = (void *)has_option; + args[nb_args++] = (void *)(long)has_option; } break; default: |