Remove redundant declarations to allow building with -Wredundant-decls.
authorzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 29 Apr 2009 01:43:01 +0000 (01:43 +0000)
committerzwelch <zwelch@b42882b7-edfa-0310-969c-e2dbd0fdcd60>
Wed, 29 Apr 2009 01:43:01 +0000 (01:43 +0000)
git-svn-id: svn://svn.berlios.de/openocd/trunk@1560 b42882b7-edfa-0310-969c-e2dbd0fdcd60

18 files changed:
src/flash/stellaris.c
src/helper/fileio.c
src/helper/jim.c
src/helper/replacements.c
src/helper/replacements.h
src/helper/time_support.c
src/jtag/jtag.h
src/server/tcl_server.c
src/target/arm7_9_common.h
src/target/arm7tdmi.c
src/target/arm926ejs.c
src/target/arm9tdmi.c
src/target/armv4_5.h
src/target/armv4_5_mmu.c
src/target/armv7m.h
src/target/embeddedice.c
src/target/etb.c
src/target/etm.c

index b13f894a24e9d596b5bfc9c71426a9df2eb88640..61e30f5dc38d0efe0147f93d0fbb10825b16a963 100644 (file)
@@ -59,7 +59,6 @@ static u32 stellaris_get_flash_status(flash_bank_t *bank);
 static void stellaris_set_flash_mode(flash_bank_t *bank,int mode);
 //static u32 stellaris_wait_status_busy(flash_bank_t *bank, u32 waitbits, int timeout);
 
-static int stellaris_read_part_info(struct flash_bank_s *bank);
 static int stellaris_handle_mass_erase_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
 static int stellaris_mass_erase(struct flash_bank_s *bank);
 
index 84e1f846e4ba3bdd563de17defa2c103907c4b39..d4cd75cddb55bcd0bf8c6a40c103c05dab8f2212 100644 (file)
@@ -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)
index bcea7c53ff2611053e9ac89766a9c2409046b2d7..7f21b4304ea98e89ecb871b16872508d3cc8e7bb 100644 (file)
@@ -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
 
index 9f1312ca92cbda7ffbde69ef358fd8715c987219..cc0c242aeac5c1d64e3bcc6edea4f3c894dc717e 100644 (file)
@@ -64,6 +64,7 @@ void *fill_malloc(size_t size)
        return t;
 }
 
+#define IN_REPLACEMENTS_C
 #include "replacements.h"
 
 #include <stdio.h>
index 8e1e51d06f445cbe24342cc9c6f4d22d797cb546..18c96701dd0e072c760453b1f10b81b6e8c5be69 100644 (file)
@@ -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:
index 6968ab7d26a69af4fa30c6b9210e17d45acf6294..bc52e9ca53472853d5e181c10340d8bf67143c1d 100644 (file)
@@ -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)
index 8f0f477c274b5d62597a9cf291e45c5eaa407a55..5dfbbdce42ff527bdc219eeaa666c058325ad93b 100644 (file)
@@ -395,7 +395,6 @@ struct jtag_tap_s
 };
 extern jtag_tap_t* jtag_AllTaps(void);
 extern jtag_tap_t* jtag_TapByPosition(int n);
-extern jtag_tap_t* jtag_TapByPosition(int n);
 extern jtag_tap_t* jtag_TapByString(const char* dotted_name);
 extern jtag_tap_t* jtag_TapByJimObj(Jim_Interp* interp, Jim_Obj* obj);
 extern jtag_tap_t* jtag_TapByAbsPosition(int abs_position);
index edc209bc4bc79c2bb715e724e5b6f8117ec257ac..070f933611e3611f5d9d5b443594e620bd4ce451 100644 (file)
@@ -43,7 +43,6 @@ typedef struct tcl_connection_s {
        int tc_outerror; /* flag an output error */
 } tcl_connection_t;
 
-extern Jim_Interp *interp;
 static unsigned short tcl_port = 0;
 
 /* commands */
index de2aef86e29eee1f4d1ec37b0f8609b15f6ac115..9b497edce385b72f530b8b96d1007fccb9246383 100644 (file)
@@ -127,7 +127,6 @@ int arm7_9_soft_reset_halt(struct target_s *target);
 int arm7_9_prepare_reset_halt(struct target_s *target);
 
 int arm7_9_halt(target_t *target);
-int arm7_9_debug_entry(target_t *target);
 int arm7_9_full_context(target_t *target);
 int arm7_9_restore_context(target_t *target);
 int arm7_9_resume(struct target_s *target, int current, u32 address, int handle_breakpoints, int debug_execution);
index 0c408a7a05184813c1605e79f140f6dde22eb6ea..1a448fc33e0b4b5e21ceccde8dac9b8a887d33de 100644 (file)
 #define _DEBUG_INSTRUCTION_EXECUTION_
 #endif
 
-/* cli handling */
-int arm7tdmi_register_commands(struct command_context_s *cmd_ctx);
-
 /* forward declarations */
 
 int arm7tdmi_target_create(struct target_s *target,Jim_Interp *interp);
-int arm7tdmi_init_target(struct command_context_s *cmd_ctx, struct target_s *target);
 int arm7tdmi_quit(void);
 
 /* target function declarations */
index ba156d485e1555c3d7ee8eaaf544002bee041e34..a6ef5e10cce1758b7a74cd7ab9b4aea6646089e7 100644 (file)
@@ -34,8 +34,6 @@
 #endif
 
 /* cli handling */
-int arm926ejs_register_commands(struct command_context_s *cmd_ctx);
-
 int arm926ejs_handle_cp15_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
 int arm926ejs_handle_cp15i_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
 int arm926ejs_handle_virt2phys_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
@@ -50,10 +48,8 @@ int arm926ejs_handle_read_mmu_command(struct command_context_s *cmd_ctx, char *c
 int arm926ejs_target_create(struct target_s *target, Jim_Interp *interp);
 int arm926ejs_init_target(struct command_context_s *cmd_ctx, struct target_s *target);
 int arm926ejs_quit(void);
-int arm926ejs_arch_state(struct target_s *target);
 int arm926ejs_read_memory(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer);
-int arm926ejs_write_memory(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer);
-int arm926ejs_soft_reset_halt(struct target_s *target);
+
 static int arm926ejs_virt2phys(struct target_s *target, u32 virtual, u32 *physical);
 static int arm926ejs_mmu(struct target_s *target, int *enabled);
 
index 15ce8dcb1235ecac244b874ea9ee3fcf636828db..1aab2864f48b8c8e35b3d6619ed93beee5c0481f 100644 (file)
 #endif
 
 /* cli handling */
-int arm9tdmi_register_commands(struct command_context_s *cmd_ctx);
 int handle_arm9tdmi_catch_vectors_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
 
 /* forward declarations */
 int arm9tdmi_target_create( struct target_s *target, Jim_Interp *interp );
 
-int arm9tdmi_init_target(struct command_context_s *cmd_ctx, struct target_s *target);
 int arm9tdmi_quit(void);
 
 target_type_t arm9tdmi_target =
index b007b51a249becc95c5a83be14527bb2a9c32b01..59f4af9994be7ceaee17a4beaa891553bd70333b 100644 (file)
@@ -139,7 +139,6 @@ static __inline enum armv4_5_mode armv4_5_number_to_mode(int number)
 
 extern int armv4_5_arch_state(struct target_s *target);
 extern int armv4_5_get_gdb_reg_list(target_t *target, reg_t **reg_list[], int *reg_list_size);
-extern int armv4_5_invalidate_core_regs(target_t *target);
 
 extern int armv4_5_register_commands(struct command_context_s *cmd_ctx);
 extern int armv4_5_init_arch_info(target_t *target, armv4_5_common_t *armv4_5);
index 1d84847e84e56eeb947242faed9dc4f9a905915a..869aabefb732042736728dc9612a614fc4de98fd 100644 (file)
@@ -30,8 +30,6 @@
 #include <stdlib.h>
 
 u32 armv4mmu_translate_va(target_t *target, armv4_5_mmu_common_t *armv4_5_mmu, u32 va, int *type, u32 *cb, int *domain, u32 *ap);
-int armv4_5_mmu_read_physical(target_t *target, armv4_5_mmu_common_t *armv4_5_mmu, u32 address, u32 size, u32 count, u8 *buffer);
-int armv4_5_mmu_write_physical(target_t *target, armv4_5_mmu_common_t *armv4_5_mmu, u32 address, u32 size, u32 count, u8 *buffer);
 
 char* armv4_5_mmu_page_type_names[] =
 {
index 909330bde0e5bcc3a0b72b09363a26a6e5c0b883..35afe11f7efe934abd50025518b8d7503248b393 100644 (file)
@@ -121,7 +121,6 @@ extern int armv7m_mode_to_number(enum armv7m_mode mode);
 
 extern int armv7m_arch_state(struct target_s *target);
 extern int armv7m_get_gdb_reg_list(target_t *target, reg_t **reg_list[], int *reg_list_size);
-extern int armv7m_invalidate_core_regs(target_t *target);
 
 extern int armv7m_register_commands(struct command_context_s *cmd_ctx);
 extern int armv7m_init_arch_info(target_t *target, armv7m_common_t *armv7m);
index 6a1cf0543753d164caa1ad08c13de0525ae4bb64..15beb9f44dfd02a1008bc079633911fe7da85781 100644 (file)
@@ -86,11 +86,6 @@ char* embeddedice_reg_list[] =
 int embeddedice_reg_arch_type = -1;
 
 int embeddedice_get_reg(reg_t *reg);
-void embeddedice_set_reg(reg_t *reg, u32 value);
-int embeddedice_set_reg_w_exec(reg_t *reg, u8 *buf);
-
-void embeddedice_write_reg(reg_t *reg, u32 value);
-int embeddedice_read_reg(reg_t *reg);
 
 reg_cache_t* embeddedice_build_reg_cache(target_t *target, arm7_9_common_t *arm7_9)
 {
index 709bb008057ac8d686df6ec95533384184f244a0..9f5e78a1ffb8bb6016387ed7872a2830553acc05 100644 (file)
@@ -52,11 +52,6 @@ char* etb_reg_list[] =
 int etb_reg_arch_type = -1;
 
 int etb_get_reg(reg_t *reg);
-int etb_set_reg(reg_t *reg, u32 value);
-int etb_set_reg_w_exec(reg_t *reg, u8 *buf);
-
-int etb_write_reg(reg_t *reg, u32 value);
-int etb_read_reg(reg_t *reg);
 
 int handle_etb_config_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc);
 
index 06b97fe39f34dcfa6c445eca4223f1fbb474694f..f95907099ac9e210e153fb674d900b44265c1fc5 100644 (file)
@@ -208,11 +208,6 @@ char* etm_reg_list[] =
 int etm_reg_arch_type = -1;
 
 int etm_get_reg(reg_t *reg);
-int etm_set_reg(reg_t *reg, u32 value);
-int etm_set_reg_w_exec(reg_t *reg, u8 *buf);
-
-int etm_write_reg(reg_t *reg, u32 value);
-int etm_read_reg(reg_t *reg);
 
 command_t *etm_cmd = NULL;
 
@@ -480,7 +475,6 @@ int etm_store_reg(reg_t *reg)
 /* ETM trace analysis functionality
  *
  */
-extern etm_capture_driver_t etb_capture_driver;
 extern etm_capture_driver_t etm_dummy_capture_driver;
 #if BUILD_OOCD_TRACE == 1
 extern etm_capture_driver_t oocd_trace_capture_driver;