From 1de959ca1c9e67ef57f77ec2d7a1132b73153abb Mon Sep 17 00:00:00 2001 From: zwelch Date: Wed, 29 Apr 2009 01:43:01 +0000 Subject: Remove redundant declarations to allow building with -Wredundant-decls. git-svn-id: svn://svn.berlios.de/openocd/trunk@1560 b42882b7-edfa-0310-969c-e2dbd0fdcd60 --- src/helper/fileio.c | 1 - src/helper/jim.c | 2 +- src/helper/replacements.c | 1 + src/helper/replacements.h | 2 ++ src/helper/time_support.c | 3 --- 5 files changed, 4 insertions(+), 5 deletions(-) (limited to 'src/helper') diff --git a/src/helper/fileio.c b/src/helper/fileio.c index 84e1f846..d4cd75cd 100644 --- a/src/helper/fileio.c +++ b/src/helper/fileio.c @@ -43,7 +43,6 @@ #include #include -int fileio_close(fileio_t *fileio); int fileio_dispatch_read(fileio_t *fileio, u32 size, u8 *buffer, u32 *size_read); int fileio_open_local(fileio_t *fileio) diff --git a/src/helper/jim.c b/src/helper/jim.c index bcea7c53..7f21b430 100644 --- a/src/helper/jim.c +++ b/src/helper/jim.c @@ -11979,7 +11979,7 @@ static int Jim_EnvCoreCommand(Jim_Interp *interp, int argc, if (argc == 1) { -#ifndef _WIN32 +#if !defined(_WIN32) && !defined(__USE_GNU) extern char **environ; #endif diff --git a/src/helper/replacements.c b/src/helper/replacements.c index 9f1312ca..cc0c242a 100644 --- a/src/helper/replacements.c +++ b/src/helper/replacements.c @@ -64,6 +64,7 @@ void *fill_malloc(size_t size) return t; } +#define IN_REPLACEMENTS_C #include "replacements.h" #include diff --git a/src/helper/replacements.h b/src/helper/replacements.h index 8e1e51d0..18c96701 100644 --- a/src/helper/replacements.h +++ b/src/helper/replacements.h @@ -103,9 +103,11 @@ struct timezone; extern int gettimeofday(struct timeval *tv, struct timezone *tz); #endif +#ifndef IN_REPLACEMENTS_C /**** clear_malloc & fill_malloc ****/ void *clear_malloc(size_t size); void *fill_malloc(size_t size); +#endif /* * Now you have 3 ways for the malloc function: diff --git a/src/helper/time_support.c b/src/helper/time_support.c index 6968ab7d..bc52e9ca 100644 --- a/src/helper/time_support.c +++ b/src/helper/time_support.c @@ -33,9 +33,6 @@ #include -int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y); -int timeval_add(struct timeval *result, struct timeval *x, struct timeval *y); -int timeval_add_time(struct timeval *result, int sec, int usec); /* calculate difference between two struct timeval values */ int timeval_subtract(struct timeval *result, struct timeval *x, struct timeval *y) -- cgit v1.2.3