From dfc6b6ef3e06c2b01d9cf496c32658f9efc01cad Mon Sep 17 00:00:00 2001 From: Julian Seward Date: Fri, 14 Oct 2005 11:25:49 +0000 Subject: [PATCH] Get rid of various compilation warnings. git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4920 --- coregrind/m_main.c | 3 ++- coregrind/m_signals.c | 2 +- coregrind/m_syscall.c | 6 +++--- 3 files changed, 6 insertions(+), 5 deletions(-) diff --git a/coregrind/m_main.c b/coregrind/m_main.c index 8727d7ff5..2cc1e4a47 100644 --- a/coregrind/m_main.c +++ b/coregrind/m_main.c @@ -768,9 +768,10 @@ static HChar* find_executable ( HChar* exec ) VG_(strncpy)( executable_name_out, exec, VKI_PATH_MAX-1 ); } else { // No '/' - we need to search the path + HChar* path; VG_(strncpy)( executable_name_in, exec, VKI_PATH_MAX-1 ); VG_(memset) ( executable_name_out, 0, VKI_PATH_MAX ); - HChar *path = VG_(getenv)("PATH"); + path = VG_(getenv)("PATH"); scan_colsep(path, match_executable); } return VG_STREQ(executable_name_out, "") ? NULL : executable_name_out; diff --git a/coregrind/m_signals.c b/coregrind/m_signals.c index 4a0542188..8f31772b8 100644 --- a/coregrind/m_signals.c +++ b/coregrind/m_signals.c @@ -392,7 +392,7 @@ void calculate_SKSS_from_SCSS ( SKSS* dst ) // We need two levels of macro-expansion here to convert __NR_rt_sigreturn // to a number before converting it to a string... sigh. -static void my_sigreturn(void); +extern void my_sigreturn(void); #if defined(VGP_x86_linux) # define _MYSIG(name) \ diff --git a/coregrind/m_syscall.c b/coregrind/m_syscall.c index a0938d59e..58b031229 100644 --- a/coregrind/m_syscall.c +++ b/coregrind/m_syscall.c @@ -105,7 +105,7 @@ SysRes VG_(mk_SysRes_Success) ( UWord val ) { clobbers, so we preserve all the callee-save regs (%esi, %edi, %ebx, %ebp). */ -static UWord do_syscall_WRK ( +extern UWord do_syscall_WRK ( UWord syscall_no, UWord a1, UWord a2, UWord a3, UWord a4, UWord a5, UWord a6 @@ -143,7 +143,7 @@ asm( no matter, they are caller-save (the syscall clobbers no callee-save regs, so we don't have to do any register saving/restoring). */ -static UWord do_syscall_WRK ( +extern UWord do_syscall_WRK ( UWord syscall_no, UWord a1, UWord a2, UWord a3, UWord a4, UWord a5, UWord a6 @@ -173,7 +173,7 @@ asm( We return a ULong, of which %r3 is the high word, and %r4 the low. No callee-save regs are clobbered, so no saving/restoring is needed. */ -static ULong do_syscall_WRK ( +extern ULong do_syscall_WRK ( UWord syscall_no, UWord a1, UWord a2, UWord a3, UWord a4, UWord a5, UWord a6