diff options
author | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-08-17 20:26:25 +0000 |
---|---|---|
committer | blueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162> | 2008-08-17 20:26:25 +0000 |
commit | 8fcd36920e1b0e5ff92efb16f7ae05112cd4defa (patch) | |
tree | a9fa6061ef07e7648ecc19cffddd422e9f82b489 /linux-user | |
parent | a5f1b965dae70f7d41721edaacb109d80721b966 (diff) |
Fix some warnings that would be generated by gcc -Wmissing-prototypes
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@5022 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'linux-user')
-rw-r--r-- | linux-user/main.c | 4 | ||||
-rw-r--r-- | linux-user/signal.c | 5 | ||||
-rw-r--r-- | linux-user/syscall.c | 34 |
3 files changed, 25 insertions, 18 deletions
diff --git a/linux-user/main.c b/linux-user/main.c index 023aac33c3..11e9be84b2 100644 --- a/linux-user/main.c +++ b/linux-user/main.c @@ -107,10 +107,12 @@ int cpu_inl(CPUState *env, int addr) return 0; } +#if defined(TARGET_I386) int cpu_get_pic_interrupt(CPUState *env) { return -1; } +#endif /* timers for rdtsc */ @@ -2151,7 +2153,7 @@ void cpu_loop (CPUState *env) } #endif /* TARGET_ALPHA */ -void usage(void) +static void usage(void) { printf("qemu-" TARGET_ARCH " version " QEMU_VERSION ", Copyright (c) 2003-2008 Fabrice Bellard\n" "usage: qemu-" TARGET_ARCH " [options] program [arguments...]\n" diff --git a/linux-user/signal.c b/linux-user/signal.c index af40238b2b..8fb3469cca 100644 --- a/linux-user/signal.c +++ b/linux-user/signal.c @@ -154,7 +154,8 @@ void host_to_target_sigset(target_sigset_t *d, const sigset_t *s) d->sig[i] = tswapl(d1.sig[i]); } -void target_to_host_sigset_internal(sigset_t *d, const target_sigset_t *s) +static void target_to_host_sigset_internal(sigset_t *d, + const target_sigset_t *s) { int i; sigemptyset(d); @@ -324,7 +325,7 @@ static inline void free_sigqueue(CPUState *env, struct sigqueue *q) } /* abort execution with signal */ -void __attribute((noreturn)) force_sig(int sig) +static void __attribute((noreturn)) force_sig(int sig) { int host_sig; host_sig = target_to_host_signal(sig); diff --git a/linux-user/syscall.c b/linux-user/syscall.c index c1cfe801cb..fd4890ed7b 100644 --- a/linux-user/syscall.c +++ b/linux-user/syscall.c @@ -105,38 +105,38 @@ #undef _syscall6 #define _syscall0(type,name) \ -type name (void) \ +static type name (void) \ { \ return syscall(__NR_##name); \ } #define _syscall1(type,name,type1,arg1) \ -type name (type1 arg1) \ +static type name (type1 arg1) \ { \ return syscall(__NR_##name, arg1); \ } #define _syscall2(type,name,type1,arg1,type2,arg2) \ -type name (type1 arg1,type2 arg2) \ +static type name (type1 arg1,type2 arg2) \ { \ return syscall(__NR_##name, arg1, arg2); \ } #define _syscall3(type,name,type1,arg1,type2,arg2,type3,arg3) \ -type name (type1 arg1,type2 arg2,type3 arg3) \ +static type name (type1 arg1,type2 arg2,type3 arg3) \ { \ return syscall(__NR_##name, arg1, arg2, arg3); \ } #define _syscall4(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4) \ -type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4) \ +static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4) \ { \ return syscall(__NR_##name, arg1, arg2, arg3, arg4); \ } #define _syscall5(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ type5,arg5) \ -type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ +static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ { \ return syscall(__NR_##name, arg1, arg2, arg3, arg4, arg5); \ } @@ -144,7 +144,8 @@ type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5) \ #define _syscall6(type,name,type1,arg1,type2,arg2,type3,arg3,type4,arg4, \ type5,arg5,type6,arg6) \ -type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5,type6 arg6) \ +static type name (type1 arg1,type2 arg2,type3 arg3,type4 arg4,type5 arg5, \ + type6 arg6) \ { \ return syscall(__NR_##name, arg1, arg2, arg3, arg4, arg5, arg6); \ } @@ -204,8 +205,10 @@ _syscall3(int, sys_getdents, uint, fd, struct dirent *, dirp, uint, count); _syscall3(int, sys_getdents64, uint, fd, struct dirent64 *, dirp, uint, count); #endif _syscall2(int, sys_getpriority, int, which, int, who); +#if !defined (__x86_64__) _syscall5(int, _llseek, uint, fd, ulong, hi, ulong, lo, loff_t *, res, uint, wh); +#endif #if defined(TARGET_NR_linkat) && defined(__NR_linkat) _syscall5(int,sys_linkat,int,olddirfd,const char *,oldpath, int,newdirfd,const char *,newpath,int,flags) @@ -253,10 +256,11 @@ _syscall3(int,sys_unlinkat,int,dirfd,const char *,pathname,int,flags) _syscall4(int,sys_utimensat,int,dirfd,const char *,pathname, const struct timespec *,tsp,int,flags) #endif +#if defined(USE_NPTL) #if defined(TARGET_NR_futex) && defined(__NR_futex) _syscall6(int,sys_futex,int *,uaddr,int,op,int,val, const struct timespec *,timeout,int *,uaddr2,int,val3) - +#endif #endif extern int personality(int); @@ -2522,8 +2526,8 @@ install: } /* specific and weird i386 syscalls */ -abi_long do_modify_ldt(CPUX86State *env, int func, abi_ulong ptr, - unsigned long bytecount) +static abi_long do_modify_ldt(CPUX86State *env, int func, abi_ulong ptr, + unsigned long bytecount) { abi_long ret; @@ -2544,7 +2548,7 @@ abi_long do_modify_ldt(CPUX86State *env, int func, abi_ulong ptr, return ret; } -abi_long do_set_thread_area(CPUX86State *env, abi_ulong ptr) +static abi_long do_set_thread_area(CPUX86State *env, abi_ulong ptr) { uint64_t *gdt_table = g2h(env->gdt.base); struct target_modify_ldt_ldt_s ldt_info; @@ -2629,7 +2633,7 @@ install: return 0; } -abi_long do_get_thread_area(CPUX86State *env, abi_ulong ptr) +static abi_long do_get_thread_area(CPUX86State *env, abi_ulong ptr) { struct target_modify_ldt_ldt_s *target_ldt_info; uint64_t *gdt_table = g2h(env->gdt.base); @@ -2677,7 +2681,7 @@ abi_long do_get_thread_area(CPUX86State *env, abi_ulong ptr) } #ifndef TARGET_ABI32 -abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr) +static abi_long do_arch_prctl(CPUX86State *env, int code, abi_ulong addr) { abi_long ret; abi_ulong val; @@ -3150,8 +3154,8 @@ static inline abi_long host_to_target_timespec(abi_ulong target_addr, futexes locally would make futexes shared between multiple processes tricky. However they're probably useless because guest atomic operations won't work either. */ -int do_futex(target_ulong uaddr, int op, int val, target_ulong timeout, - target_ulong uaddr2, int val3) +static int do_futex(target_ulong uaddr, int op, int val, target_ulong timeout, + target_ulong uaddr2, int val3) { struct timespec ts, *pts; |