Commit f3e3285dcdcf84aa3f19ae888a914660922ad5f7

Authored by ths
1 parent 2e13d23a

Fix some compiler warnings.


git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@3520 c046a42c-6fe2-441c-8c8c-71466251a162
linux-user/qemu.h
... ... @@ -9,10 +9,16 @@
9 9 #ifdef TARGET_ABI32
10 10 typedef uint32_t abi_ulong;
11 11 typedef int32_t abi_long;
  12 +#define TARGET_ABI_FMT_lx "%08x"
  13 +#define TARGET_ABI_FMT_ld "%d"
  14 +#define TARGET_ABI_FMT_lu "%u"
12 15 #define TARGET_ABI_BITS 32
13 16 #else
14 17 typedef target_ulong abi_ulong;
15 18 typedef target_long abi_long;
  19 +#define TARGET_ABI_FMT_lx TARGET_FMT_lx
  20 +#define TARGET_ABI_FMT_ld TARGET_FMT_ld
  21 +#define TARGET_ABI_FMT_lu TARGET_FMT_lu
16 22 #define TARGET_ABI_BITS TARGET_LONG_BITS
17 23 #endif
18 24  
... ...
linux-user/strace.c
... ... @@ -106,7 +106,8 @@ print_timeval(target_ulong tv_addr)
106 106 return;
107 107  
108 108 tv = lock_user(tv_addr, sizeof(*tv), 1);
109   - gemu_log("{%d,%d}", tv->tv_sec, tv->tv_usec);
  109 + gemu_log("{" TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "}",
  110 + tv->tv_sec, tv->tv_usec);
110 111 unlock_user(tv, tv_addr, 0);
111 112 } else
112 113 gemu_log("NULL");
... ... @@ -220,12 +221,15 @@ if( ret == -1 ) {
220 221 }
221 222 }
222 223  
  224 +#if 0 /* currently unused */
223 225 static void
224 226 print_syscall_ret_raw(struct syscallname *name, target_long ret)
225 227 {
226 228 gemu_log(" = " TARGET_FMT_lx "\n", ret);
227 229 }
  230 +#endif
228 231  
  232 +#ifdef TARGET_NR__newselect
229 233 static void
230 234 print_syscall_ret_newselect(struct syscallname *name, target_long ret)
231 235 {
... ... @@ -239,6 +243,7 @@ print_syscall_ret_newselect(struct syscallname *name, target_long ret)
239 243 print_timeval(newselect_arg5);
240 244 gemu_log(")\n");
241 245 }
  246 +#endif
242 247  
243 248 /*
244 249 * An array of all of the syscalls we know about
... ...