Skip to content

Fix errors and warnings when compiling with keil #10

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 9 additions & 6 deletions Shell.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ static int shell_parse(char * buf, char** argv, unsigned short maxargs);
/**
* Prints the command shell prompt
*/
static void shell_prompt();
static void shell_prompt(void);

/**
* Helper function for formatting text in shell_printf and shell_printf_pm
Expand Down Expand Up @@ -115,7 +115,7 @@ bool shell_register(shell_program_t program, const char * string)
return false;
}

void shell_unregister_all()
void shell_unregister_all(void)
{
unsigned char i;

Expand All @@ -125,7 +125,7 @@ void shell_unregister_all()
}
}

void shell_print_commands()
void shell_print_commands(void)
{
unsigned char i;

Expand Down Expand Up @@ -255,7 +255,9 @@ void shell_printf(const char * fmt, ...)
va_end(argl);
}

void shell_printf_pm(const char * fmt, ...)
#ifdef ARDUINO

void shell_printf_pm(const char *fmt, ...)
{
// First copy to RAM
memcpy_P(shellfmtbuf, fmt, strlen_P(fmt) + 1);
Expand All @@ -264,8 +266,9 @@ void shell_printf_pm(const char * fmt, ...)
shell_format(shellfmtbuf, argl);
va_end(argl);
}
#endif

void shell_task()
void shell_task(void)
{
unsigned int i = 0, retval = 0;
int argc = 0;
Expand Down Expand Up @@ -398,7 +401,7 @@ static int shell_parse(char * buf, char ** argv, unsigned short maxargs)
return argc;
}

static void shell_prompt()
static void shell_prompt(void)
{
#ifdef ARDUINO
shell_print_pm(PSTR("device>"));
Expand Down
6 changes: 3 additions & 3 deletions Shell.h
Original file line number Diff line number Diff line change
Expand Up @@ -186,15 +186,15 @@ extern "C" {
*
* Erases all entries on the command list, returning it to it�s default status.
*/
void shell_unregister_all();
void shell_unregister_all(void);

/**
* @brief Prints the list of registered commands
*
* Prints a list of available commands to the terminal using the callback
* functions provided on initialization.
*/
void shell_print_commands();
void shell_print_commands(void);

/**
* @brief Prints error messages to the terminal screen
Expand Down Expand Up @@ -253,7 +253,7 @@ extern "C" {
* this function should be called frequently so it can handle the input from the
* data stream.
*/
void shell_task();
void shell_task(void);

#ifdef ARDUINO
/**
Expand Down