aboutsummaryrefslogtreecommitdiff
path: root/src/target
diff options
context:
space:
mode:
Diffstat (limited to 'src/target')
-rw-r--r--src/target/arm11.c2
-rw-r--r--src/target/arm720t.c4
-rw-r--r--src/target/arm7tdmi.c4
-rw-r--r--src/target/arm920t.c4
-rw-r--r--src/target/arm926ejs.c4
-rw-r--r--src/target/arm9tdmi.c4
-rw-r--r--src/target/cortex_m3.c4
-rw-r--r--src/target/feroceon.c5
-rw-r--r--src/target/mips32_pracc.c1
-rw-r--r--src/target/mips_m4k.c6
-rw-r--r--src/target/target.c6
-rw-r--r--src/target/target.h4
-rw-r--r--src/target/xscale.c6
13 files changed, 28 insertions, 26 deletions
diff --git a/src/target/arm11.c b/src/target/arm11.c
index 9e131d8..7c947fc 100644
--- a/src/target/arm11.c
+++ b/src/target/arm11.c
@@ -1716,7 +1716,7 @@ int arm11_handle_mrc_mcr(struct command_context_s *cmd_ctx, char *cmd, char **ar
if (values[i] > arm11_coproc_instruction_limits[i])
{
LOG_ERROR("Parameter %ld out of bounds (%d max). %s",
- i + 2, arm11_coproc_instruction_limits[i],
+ (long)(i + 2), arm11_coproc_instruction_limits[i],
read ? arm11_mrc_syntax : arm11_mcr_syntax);
return -1;
}
diff --git a/src/target/arm720t.c b/src/target/arm720t.c
index cc45c9e..e253e8e 100644
--- a/src/target/arm720t.c
+++ b/src/target/arm720t.c
@@ -43,7 +43,7 @@ int arm720t_handle_mw_phys_command(struct command_context_s *cmd_ctx, char *cmd,
/* forward declarations */
int arm720t_target_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct target_s *target);
int arm720t_init_target(struct command_context_s *cmd_ctx, struct target_s *target);
-int arm720t_quit();
+int arm720t_quit(void);
int arm720t_arch_state(struct target_s *target);
int arm720t_read_memory(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer);
int arm720t_write_memory(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer);
@@ -423,7 +423,7 @@ int arm720t_init_target(struct command_context_s *cmd_ctx, struct target_s *targ
}
-int arm720t_quit()
+int arm720t_quit(void)
{
return ERROR_OK;
diff --git a/src/target/arm7tdmi.c b/src/target/arm7tdmi.c
index 41771ab..af6837e 100644
--- a/src/target/arm7tdmi.c
+++ b/src/target/arm7tdmi.c
@@ -46,7 +46,7 @@ int arm7tdmi_register_commands(struct command_context_s *cmd_ctx);
/* forward declarations */
int arm7tdmi_target_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct target_s *target);
int arm7tdmi_init_target(struct command_context_s *cmd_ctx, struct target_s *target);
-int arm7tdmi_quit();
+int arm7tdmi_quit(void);
/* target function declarations */
int arm7tdmi_poll(struct target_s *target);
@@ -753,7 +753,7 @@ int arm7tdmi_init_target(struct command_context_s *cmd_ctx, struct target_s *tar
}
-int arm7tdmi_quit()
+int arm7tdmi_quit(void)
{
return ERROR_OK;
diff --git a/src/target/arm920t.c b/src/target/arm920t.c
index 3a3c2f1..c14f6ef 100644
--- a/src/target/arm920t.c
+++ b/src/target/arm920t.c
@@ -48,7 +48,7 @@ int arm920t_handle_read_mmu_command(struct command_context_s *cmd_ctx, char *cmd
/* forward declarations */
int arm920t_target_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct target_s *target);
int arm920t_init_target(struct command_context_s *cmd_ctx, struct target_s *target);
-int arm920t_quit();
+int arm920t_quit(void);
int arm920t_arch_state(struct target_s *target);
int arm920t_read_memory(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer);
int arm920t_write_memory(struct target_s *target, u32 address, u32 size, u32 count, u8 *buffer);
@@ -685,7 +685,7 @@ int arm920t_init_target(struct command_context_s *cmd_ctx, struct target_s *targ
}
-int arm920t_quit()
+int arm920t_quit(void)
{
return ERROR_OK;
diff --git a/src/target/arm926ejs.c b/src/target/arm926ejs.c
index 386d447..cec3d0f 100644
--- a/src/target/arm926ejs.c
+++ b/src/target/arm926ejs.c
@@ -48,7 +48,7 @@ int arm926ejs_handle_read_mmu_command(struct command_context_s *cmd_ctx, char *c
/* forward declarations */
int arm926ejs_target_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct target_s *target);
int arm926ejs_init_target(struct command_context_s *cmd_ctx, struct target_s *target);
-int arm926ejs_quit();
+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);
@@ -666,7 +666,7 @@ int arm926ejs_init_target(struct command_context_s *cmd_ctx, struct target_s *ta
}
-int arm926ejs_quit()
+int arm926ejs_quit(void)
{
return ERROR_OK;
diff --git a/src/target/arm9tdmi.c b/src/target/arm9tdmi.c
index adb21f7..c6a13ad 100644
--- a/src/target/arm9tdmi.c
+++ b/src/target/arm9tdmi.c
@@ -48,7 +48,7 @@ int handle_arm9tdmi_catch_vectors_command(struct command_context_s *cmd_ctx, cha
/* forward declarations */
int arm9tdmi_target_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct target_s *target);
int arm9tdmi_init_target(struct command_context_s *cmd_ctx, struct target_s *target);
-int arm9tdmi_quit();
+int arm9tdmi_quit(void);
target_type_t arm9tdmi_target =
{
@@ -896,7 +896,7 @@ int arm9tdmi_init_target(struct command_context_s *cmd_ctx, struct target_s *tar
}
-int arm9tdmi_quit()
+int arm9tdmi_quit(void)
{
return ERROR_OK;
diff --git a/src/target/cortex_m3.c b/src/target/cortex_m3.c
index 255fcd0..9e0916f 100644
--- a/src/target/cortex_m3.c
+++ b/src/target/cortex_m3.c
@@ -47,7 +47,7 @@ void cortex_m3_enable_breakpoints(struct target_s *target);
void cortex_m3_enable_watchpoints(struct target_s *target);
int cortex_m3_target_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct target_s *target);
int cortex_m3_init_target(struct command_context_s *cmd_ctx, struct target_s *target);
-int cortex_m3_quit();
+int cortex_m3_quit(void);
int cortex_m3_load_core_reg_u32(target_t *target, enum armv7m_regtype type, u32 num, u32 *value);
int cortex_m3_store_core_reg_u32(target_t *target, enum armv7m_regtype type, u32 num, u32 value);
int cortex_m3_target_request_data(target_t *target, u32 size, u8 *buffer);
@@ -1374,7 +1374,7 @@ int cortex_m3_examine(struct target_s *target)
return ERROR_OK;
}
-int cortex_m3_quit()
+int cortex_m3_quit(void)
{
return ERROR_OK;
diff --git a/src/target/feroceon.c b/src/target/feroceon.c
index 8178e55..9c77471 100644
--- a/src/target/feroceon.c
+++ b/src/target/feroceon.c
@@ -58,7 +58,7 @@ int feroceon_examine(struct target_s *target);
int feroceon_target_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct target_s *target);
int feroceon_bulk_write_memory(target_t *target, u32 address, u32 count, u8 *buffer);
int feroceon_init_target(struct command_context_s *cmd_ctx, struct target_s *target);
-int feroceon_quit();
+int feroceon_quit(void);
target_type_t feroceon_target =
{
@@ -381,6 +381,7 @@ void feroceon_branch_resume_thumb(target_t *target)
arm_jtag_t *jtag_info = &arm7_9->jtag_info;
u32 r0 = buf_get_u32(armv4_5->core_cache->reg_list[0].value, 0, 32);
u32 pc = buf_get_u32(armv4_5->core_cache->reg_list[15].value, 0, 32);
+ (void)(r0); // use R0...
arm9tdmi_clock_out(jtag_info, ARMV4_5_NOP, 0, NULL, 0);
arm9tdmi_clock_out(jtag_info, ARMV4_5_NOP, 0, NULL, 0);
@@ -627,7 +628,7 @@ int feroceon_init_target(struct command_context_s *cmd_ctx, struct target_s *tar
return ERROR_OK;
}
-int feroceon_quit()
+int feroceon_quit(void)
{
return ERROR_OK;
}
diff --git a/src/target/mips32_pracc.c b/src/target/mips32_pracc.c
index 400227e..d6351f9 100644
--- a/src/target/mips32_pracc.c
+++ b/src/target/mips32_pracc.c
@@ -23,6 +23,7 @@
#include "config.h"
#endif
+#include <string.h>
#include "log.h"
#include "mips32.h"
#include "mips32_pracc.h"
diff --git a/src/target/mips_m4k.c b/src/target/mips_m4k.c
index 2a34bd0..4cefbf9 100644
--- a/src/target/mips_m4k.c
+++ b/src/target/mips_m4k.c
@@ -46,7 +46,7 @@ int mips_m4k_init_target(struct command_context_s *cmd_ctx, struct target_s *tar
int mips_m4k_quit();
int mips_m4k_target_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct target_s *target);
-int mips_m4k_examine(struct target_s *target);
+int mips_m4k_examine(struct command_context_s *cmd_ctx, struct target_s *target);
int mips_m4k_assert_reset(target_t *target);
int mips_m4k_deassert_reset(target_t *target);
@@ -569,7 +569,7 @@ int mips_m4k_init_target(struct command_context_s *cmd_ctx, struct target_s *tar
return ERROR_OK;
}
-int mips_m4k_quit()
+int mips_m4k_quit(void)
{
return ERROR_OK;
}
@@ -618,7 +618,7 @@ int mips_m4k_target_command(struct command_context_s *cmd_ctx, char *cmd, char *
return ERROR_OK;
}
-int mips_m4k_examine(struct target_s *target)
+int mips_m4k_examine(struct command_context_s *cmd_ctx, struct target_s *target)
{
int retval;
mips32_common_t *mips32 = target->arch_info;
diff --git a/src/target/target.c b/src/target/target.c
index 0950e43..37e1b36 100644
--- a/src/target/target.c
+++ b/src/target/target.c
@@ -666,15 +666,15 @@ static int target_call_timer_callbacks_check_time(int checktime)
return ERROR_OK;
}
-int target_call_timer_callbacks()
+int target_call_timer_callbacks(void)
{
return target_call_timer_callbacks_check_time(1);
}
/* invoke periodic callbacks immediately */
-int target_call_timer_callbacks_now()
+int target_call_timer_callbacks_now(void)
{
- return target_call_timer_callbacks(0);
+ return target_call_timer_callbacks();
}
int target_alloc_working_area(struct target_s *target, u32 size, working_area_t **area)
diff --git a/src/target/target.h b/src/target/target.h
index 8673ddc..2551ede 100644
--- a/src/target/target.h
+++ b/src/target/target.h
@@ -266,11 +266,11 @@ extern int target_call_event_callbacks(target_t *target, enum target_event event
*/
extern int target_register_timer_callback(int (*callback)(void *priv), int time_ms, int periodic, void *priv);
extern int target_unregister_timer_callback(int (*callback)(void *priv), void *priv);
-extern int target_call_timer_callbacks();
+extern int target_call_timer_callbacks(void);
/* invoke this to ensure that e.g. polling timer callbacks happen before
* a syncrhonous command completes.
*/
-extern int target_call_timer_callbacks_now();
+extern int target_call_timer_callbacks_now(void);
extern target_t* get_current_target(struct command_context_s *cmd_ctx);
extern int get_num_by_target(target_t *query_target);
diff --git a/src/target/xscale.c b/src/target/xscale.c
index 0c99abf..39378c0 100644
--- a/src/target/xscale.c
+++ b/src/target/xscale.c
@@ -55,7 +55,7 @@ int xscale_register_commands(struct command_context_s *cmd_ctx);
/* forward declarations */
int xscale_target_command(struct command_context_s *cmd_ctx, char *cmd, char **args, int argc, struct target_s *target);
int xscale_init_target(struct command_context_s *cmd_ctx, struct target_s *target);
-int xscale_quit();
+int xscale_quit(void);
int xscale_arch_state(struct target_s *target);
int xscale_poll(target_t *target);
@@ -1579,7 +1579,7 @@ int xscale_assert_reset(target_t *target)
jtag_execute_queue();
target->state = TARGET_RESET;
-
+
if (target->reset_halt)
{
int retval;
@@ -2989,7 +2989,7 @@ int xscale_init_target(struct command_context_s *cmd_ctx, struct target_s *targe
return ERROR_OK;
}
-int xscale_quit()
+int xscale_quit(void)
{
return ERROR_OK;