Commit 958090f2 authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

more fixes to compilation warnings

parent 9e5e9f80
......@@ -332,7 +332,7 @@ static const char *nco_sync_source_to_string(int src)
}
static int ertm14_monitor_ui()
static int ertm14_monitor_ui(void)
{
if( !tmo_expired( &ertm14_mon_timer ))
return 0;
......@@ -393,4 +393,4 @@ void ertm14_shell_init()
{
shell_register_command( &__wrc_cmd_ertm );
shell_register_command( &__wrc_cmd_ertm_ui );
}
\ No newline at end of file
}
......@@ -2,6 +2,7 @@
#include "dev/bb_spi.h"
#include "dev/spi_flash.h"
#include "dev/syscon.h"
#include "dev/endpoint.h"
#include "storage.h"
int wrc_board_early_init()
......
......@@ -193,7 +193,7 @@ int puts(const char *s)
return con_uart_put_string( &console_uart_dev, s );
}
int i, rv;
int i, rv = 0;
for(i = 0; i < BOARD_MAX_CONSOLE_DEVICES; i++)
{
......@@ -225,7 +225,7 @@ int console_getc()
return -1;
}
void console_register_device( struct console_device *dev )
static void console_register_device( struct console_device *dev )
{
int i;
for(i = 0; i < BOARD_MAX_CONSOLE_DEVICES; i++)
......
......@@ -8,6 +8,7 @@
*/
#include <stdio.h>
#include <string.h>
#include <wrc.h>
#include "board.h"
......@@ -136,8 +137,6 @@ void ep_reset_phy(void)
starts up 802.3 autonegotiation process */
int ep_enable(int enabled, int autoneg)
{
uint16_t mcr;
if (!enabled) {
EP->ECR = 0;
return 0;
......
......@@ -20,6 +20,7 @@ extern struct console_device *console;
void console_set_device( struct console_device *dev );
void console_uart_write_bytes( uint8_t *buf, int count );
void console_uart_set_crlf_mode(int on);
void console_init(void);
int console_getc(void);
......
......@@ -17,6 +17,7 @@ struct simple_uart_device {
(CPU_CLOCK >> 8)) / (CPU_CLOCK >> 7) )
void suart_init(struct simple_uart_device *dev, uint32_t base_addr, int baudrate);
void suart_init_default_baudrate(struct simple_uart_device *dev, uint32_t base_addr);
void suart_write_byte(struct simple_uart_device *dev, int b);
int suart_write_string(struct simple_uart_device *dev, const char *s);
int suart_read_byte(struct simple_uart_device *dev);
......
......@@ -72,7 +72,7 @@ static inline int queue_full(struct event_queue *buf)
return buf->size == buf->count;
}
static inline int queue_purge(struct event_queue *buf)
static inline void queue_purge(struct event_queue *buf)
{
buf->head = buf->tail = buf->count = 0;
}
......@@ -128,7 +128,7 @@ int event_poll( int handler )
return queue_get( &eh->queue );
}
int events_init()
void events_init(void)
{
int i;
......@@ -138,7 +138,7 @@ int events_init()
handlers[i].enabled = 0;
}
int events_dispatch()
void events_dispatch(void)
{
int i;
......
......@@ -15,7 +15,7 @@ int event_listener_create( void );
int event_handler_enable( int id, int enable );
int event_post( int event );
int event_poll( int handler );
int events_init(void);
int events_dispatch(void);
void events_init(void);
void events_dispatch(void);
#endif
\ No newline at end of file
#endif
......@@ -1440,8 +1440,8 @@ static int set_sdb(uint8_t *buf, struct snmp_oid *obj)
int ret;
int32_t *apply_mode;
uint8_t i2c_adr = FMC_EEPROM_ADR;
int blocksize = 1;
//uint8_t i2c_adr = FMC_EEPROM_ADR;
//int blocksize = 1;
int forced_base = 0;
apply_mode = obj->p;
......
#include <stdio.h>
#include <stdint.h>
#include <string.h>
#include "wrc.h"
#include "wrc-task.h"
......@@ -80,7 +81,7 @@ static void wrc_run_task(struct wrc_task *t)
account_task(t, done_sth);
}
struct wrc_task* wrc_task_create( const char *name, void (*init)(), int (*job)() )
struct wrc_task* wrc_task_create( const char *name, void (*init)(void), int (*job)(void) )
{
struct wrc_task *t = NULL;
int i;
......@@ -97,9 +98,9 @@ struct wrc_task* wrc_task_create( const char *name, void (*init)(), int (*job)()
t->used = 1;
t->init = init;
t->job = job;
t->enabled = NULL;
strncpy(t->name, name, 16);
t->enabled = NULL;
strncpy(t->name, name, 16);
return t;
}
......@@ -109,7 +110,7 @@ struct wrc_task *wrc_task_get(int tid)
return &tasks[tid];
}
void wrc_task_set_enable( struct wrc_task* task, int (*enabled)() )
void wrc_task_set_enable( struct wrc_task* task, int (*enabled)(void) )
{
task->enabled = enabled;
}
......
......@@ -28,8 +28,6 @@ static int cmd_diag(const char *args[])
return 0;
}
int all = strcasecmp(args[0], "all");
if (!strcasecmp(args[0], "all"))
{
int i;
......
......@@ -23,12 +23,12 @@ static int cmd_ps(const char *args[])
if(!strcasecmp(args[0], "reset")) {
for(i = 0; i < WRC_MAX_TASKS; i++)
{
struct wrc_task* t = wrc_task_get(i);
t = wrc_task_get(i);
if(!t)
return 0;
if(!t->used)
continue;
t->nrun = t->seconds = t->nanos = t->max_run_ticks = 0;
t->nrun = t->seconds = t->nanos = t->max_run_ticks = 0;
}
return 0;
} else if (!strcasecmp(args[0], "max")) {
......@@ -42,7 +42,7 @@ static int cmd_ps(const char *args[])
pp_printf(" iterations seconds.micros max_ms name\n");
for(i = 0; i < WRC_MAX_TASKS; i++)
{
struct wrc_task* t = wrc_task_get(i);
t = wrc_task_get(i);
if(!t)
return 0;
if(!t->used)
......
......@@ -20,8 +20,6 @@
static int cmd_sdb(const char *args[])
{
int blocksize = 1;
if (!args[0])
{
pp_printf("Command expected: format, ls\n");
......
......@@ -338,7 +338,7 @@ void shell_list_cmds()
}
}
void shell_activate_ui_command( int (*callback)() )
void shell_activate_ui_command( int (*callback)(void) )
{
shell_ui_callback = callback;
state = SH_EXEC_UI;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment