Fix compiler warnings

This commit is contained in:
Adam Dunkels 2015-10-04 22:31:43 +02:00 committed by Simon Duquennoy
parent c0de05f9a8
commit 08c6a69fe8

View File

@ -158,7 +158,6 @@ PROCESS_THREAD(shell_repeat_server_process, ev, data)
static char *command;
static struct process *started_process;
char command_copy[MAX_COMMANDLENGTH];
int ret;
if(ev == shell_event_input) {
goto exit;
@ -172,7 +171,7 @@ PROCESS_THREAD(shell_repeat_server_process, ev, data)
data == &shell_repeat_process);
{
strncpy(command_copy, command, MAX_COMMANDLENGTH);
ret = shell_start_command(command_copy, (int)strlen(command_copy),
shell_start_command(command_copy, (int)strlen(command_copy),
&repeat_command, &started_process);
if(started_process != NULL &&
@ -202,11 +201,10 @@ repeat_print_usage(void)
/*---------------------------------------------------------------------------*/
PROCESS_THREAD(shell_repeat_process, ev, data)
{
static int reps, period, period_left;
static int reps, period;
static char command[MAX_COMMANDLENGTH];
static struct etimer etimer;
static int i;
static clock_time_t start_time;
const char *args, *next;
if(ev == shell_event_input) {
@ -258,7 +256,6 @@ PROCESS_THREAD(shell_repeat_process, ev, data)
/* printf("repeats %d period %d command '%s'\n",
reps, period, command);*/
start_time = clock_time();
etimer_set(&etimer, CLOCK_SECOND * period);
for(i = 0; reps == 0 || i < reps; ++i) {
@ -291,7 +288,6 @@ PROCESS_THREAD(shell_randwait_process, ev, data)
static struct etimer etimer;
static struct process *started_process;
const char *args, *next;
int ret;
/* if(ev == shell_event_input) {
struct shell_input *input;
@ -339,7 +335,7 @@ PROCESS_THREAD(shell_randwait_process, ev, data)
/* printf("Starting '%s' child %p (%s)\n", command, randwait_command.child, */
/* randwait_command.child == NULL? "null": randwait_command.child->command); */
ret = shell_start_command(command, (int)strlen(command),
shell_start_command(command, (int)strlen(command),
randwait_command.child, &started_process);
if(started_process != NULL &&