diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-09-14 06:45:34 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-09-14 06:45:34 +0000 |
commit | 7ccfb2eb5f9d91bdb4139cb420a3b5f8deb2f6e8 (patch) | |
tree | 29ccfd792bcd8109ef331d031b6f04d89b99b310 /linux-user | |
parent | 5d0c5750bb19212c8ecfb9660956611baf6aa861 (diff) |
Fix warnings that would be caused by gcc flag -Wwrite-strings
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5206 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/arm/nwfpe/fpopcode.h | 6 | ||||
-rw-r--r-- | linux-user/strace.c | 29 |
2 files changed, 18 insertions, 17 deletions
diff --git a/linux-user/arm/nwfpe/fpopcode.h b/linux-user/arm/nwfpe/fpopcode.h index 6c51067b6c..0b501dc6ea 100644 --- a/linux-user/arm/nwfpe/fpopcode.h +++ b/linux-user/arm/nwfpe/fpopcode.h @@ -366,19 +366,19 @@ TABLE 5 /* Get the rounding mode from the opcode. */ #define getRoundingMode(opcode) ((opcode & MASK_ROUNDING_MODE) >> 5) -static inline const floatx80 getExtendedConstant(const unsigned int nIndex) +static inline floatx80 getExtendedConstant(const unsigned int nIndex) { extern const floatx80 floatx80Constant[]; return floatx80Constant[nIndex]; } -static inline const float64 getDoubleConstant(const unsigned int nIndex) +static inline float64 getDoubleConstant(const unsigned int nIndex) { extern const float64 float64Constant[]; return float64Constant[nIndex]; } -static inline const float32 getSingleConstant(const unsigned int nIndex) +static inline float32 getSingleConstant(const unsigned int nIndex) { extern const float32 float32Constant[]; return float32Constant[nIndex]; diff --git a/linux-user/strace.c b/linux-user/strace.c index 76aa3f609e..cc0f4d10d6 100644 --- a/linux-user/strace.c +++ b/linux-user/strace.c @@ -13,12 +13,12 @@ int do_strace=0; struct syscallname { int nr; - char *name; - char *format; - void (*call)(struct syscallname *, + const char *name; + const char *format; + void (*call)(const struct syscallname *, abi_long, abi_long, abi_long, abi_long, abi_long, abi_long); - void (*result)(struct syscallname *, abi_long); + void (*result)(const struct syscallname *, abi_long); }; /* @@ -131,7 +131,7 @@ static long newselect_arg4 = 0; static long newselect_arg5 = 0; static void -print_newselect(struct syscallname *name, +print_newselect(const struct syscallname *name, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6) { @@ -155,7 +155,7 @@ print_newselect(struct syscallname *name, #endif static void -print_semctl(struct syscallname *name, +print_semctl(const struct syscallname *name, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6) { @@ -165,7 +165,7 @@ print_semctl(struct syscallname *name, } static void -print_execve(struct syscallname *name, +print_execve(const struct syscallname *name, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6) { @@ -198,14 +198,15 @@ print_execve(struct syscallname *name, #ifdef TARGET_NR_ipc static void -print_ipc(struct syscallname *name, +print_ipc(const struct syscallname *name, abi_long arg1, abi_long arg2, abi_long arg3, abi_long arg4, abi_long arg5, abi_long arg6) { switch(arg1) { case IPCOP_semctl: - name->name = "semctl"; - print_semctl(name,arg2,arg3,arg4,arg5,arg6,0); + gemu_log("semctl(" TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld ",", arg1, arg2); + print_ipc_cmd(arg3); + gemu_log(",0x" TARGET_ABI_FMT_lx ")", arg4); break; default: gemu_log("%s(" TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld ")", @@ -219,7 +220,7 @@ print_ipc(struct syscallname *name, */ static void -print_syscall_ret_addr(struct syscallname *name, abi_long ret) +print_syscall_ret_addr(const struct syscallname *name, abi_long ret) { if( ret == -1 ) { gemu_log(" = -1 errno=%d (%s)\n", errno, target_strerror(errno)); @@ -238,7 +239,7 @@ print_syscall_ret_raw(struct syscallname *name, abi_long ret) #ifdef TARGET_NR__newselect static void -print_syscall_ret_newselect(struct syscallname *name, abi_long ret) +print_syscall_ret_newselect(const struct syscallname *name, abi_long ret) { gemu_log(" = 0x" TARGET_ABI_FMT_lx " (", ret); print_fdset(newselect_arg1,newselect_arg2); @@ -256,7 +257,7 @@ print_syscall_ret_newselect(struct syscallname *name, abi_long ret) * An array of all of the syscalls we know about */ -static struct syscallname scnames[] = { +static const struct syscallname scnames[] = { #include "strace.list" }; @@ -271,7 +272,7 @@ print_syscall(int num, abi_long arg4, abi_long arg5, abi_long arg6) { int i; - char *format="%s(" TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld ")"; + const char *format="%s(" TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld "," TARGET_ABI_FMT_ld ")"; gemu_log("%d ", getpid() ); |