summaryrefslogtreecommitdiff
path: root/src/helper
diff options
context:
space:
mode:
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-04-29 01:43:01 +0000
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>2009-04-29 01:43:01 +0000
commit1de959ca1c9e67ef57f77ec2d7a1132b73153abb (patch)
tree6e2feea9aa7b86028a10feffd199011446687af7 /src/helper
parent55c39bae67cb3b26dacb78a9d45fcd900745c3d8 (diff)
downloadopenocd_libswd-1de959ca1c9e67ef57f77ec2d7a1132b73153abb.tar.gz
openocd_libswd-1de959ca1c9e67ef57f77ec2d7a1132b73153abb.tar.bz2
openocd_libswd-1de959ca1c9e67ef57f77ec2d7a1132b73153abb.tar.xz
openocd_libswd-1de959ca1c9e67ef57f77ec2d7a1132b73153abb.zip
Remove redundant declarations to allow building with -Wredundant-decls.
git-svn-id: svn://svn.berlios.de/openocd/trunk@1560 b42882b7-edfa-0310-969c-e2dbd0fdcd60
Diffstat (limited to 'src/helper')
-rw-r--r--src/helper/fileio.c1
-rw-r--r--src/helper/jim.c2
-rw-r--r--src/helper/replacements.c1
-rw-r--r--src/helper/replacements.h2
-rw-r--r--src/helper/time_support.c3
5 files changed, 4 insertions, 5 deletions
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 <errno.h>
#include <ctype.h>
-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 <stdio.h>
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 <stdlib.h>
-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)