Commit f81f75ed authored by Grzegorz Daniluk's avatar Grzegorz Daniluk

fix compilation warnings

parent 8e4e9093
......@@ -38,7 +38,7 @@ void shell_boot_script(void);
void shell_show_build_init(void);
void shell_register_command( struct wrc_shell_cmd* cmd );
void shell_list_cmds(void);
void shell_register_commands();
void shell_activate_ui_command( int (*callback)() );
void shell_register_commands(void);
void shell_activate_ui_command( int (*callback)(void) );
#endif
......@@ -139,6 +139,7 @@ int storage_load_calibration(void);
int storage_save_calibration(void);
int storage_read_hdl_cfg(void);
int storage_mount( struct storage_device *dev );
#endif
......@@ -53,6 +53,7 @@
extern int wrc_vlan_number;
int wrc_mon_gui(void);
int wrc_log_stats(void);
void shell_init(void);
/* Default width (in 8ns/16ns units) of the pulses on the PPS output */
......
......@@ -199,7 +199,7 @@ int sdbfs_open_name(struct sdbfs *fs, const char *name)
return -ENOENT;
sdbfs_scan(fs, 1); /* new scan: get the interconnect and igore it */
while ( (d = sdbfs_scan(fs, 0)) != NULL) {
if (strncmp(name, d->sdb_component.product.name, len))
if (strncmp(name, (char *) d->sdb_component.product.name, len))
continue;
if (len < 19 && d->sdb_component.product.name[len] != ' ')
continue;
......
......@@ -50,7 +50,7 @@ static struct wrc_shell_cmd *cmds[ SHELL_MAX_COMMANDS ];
static int n_cmds = 0;
int shell_is_interacting;
int (*shell_ui_callback)();
int (*shell_ui_callback)(void);
static int insert(char c)
{
......@@ -349,7 +349,7 @@ void shell_activate_ui_command( int (*callback)() )
#define REGISTER_WRC_COMMAND(_name) \
{ extern struct wrc_shell_cmd __wrc_cmd_ ## _name; shell_register_command( &__wrc_cmd_ ## _name ); }
void shell_register_commands()
void shell_register_commands(void)
{
REGISTER_WRC_COMMAND(gui);
REGISTER_WRC_COMMAND(ps);
......
......@@ -30,6 +30,7 @@
#include <lib/ipv4.h>
#include <dev/rxts_calibrator.h>
#include <dev/flash.h>
#include <dev/gpio.h>
#include <wrc_ptp.h>
#include <system_checks.h>
......@@ -64,8 +65,6 @@ int wrc_wr_diags(void); // fixme: move the header
static void wrc_initialize(void)
{
uint8_t mac_addr[6];
#ifdef CONFIG_USE_SDB
sdb_find_devices();
#endif
......@@ -111,7 +110,7 @@ static void wrc_initialize(void)
int link_status;
static int is_link_up()
static int is_link_up(void)
{
return link_status == LINK_UP;
}
......@@ -203,20 +202,20 @@ static void wrc_dispatch_ptp_events_init(void)
prev_timing_ok = 0;
}
static void wrc_dispatch_ptp_events_poll(void)
static int wrc_dispatch_ptp_events_poll(void)
{
extern struct pp_instance ppi_static;
struct pp_instance *ppi = &ppi_static;
struct wr_servo_state *ss = &((struct wr_data *)ppi->ext_data)->servo_state;
struct pp_instance *ppi = &ppi_static;
struct wr_servo_state *ss = &((struct wr_data *)ppi->ext_data)->servo_state;
int mode = wrc_ptp_get_mode();
int mode = wrc_ptp_get_mode();
if( mode != prev_ptp_mode )
{
main_dbg("PTP mode changed.\n");
if( mode != prev_ptp_mode )
{
main_dbg("PTP mode changed.\n");
prev_timing_ok = 0;
event_post( WRC_EVENT_PTP_MODE_CHANGED );
}
event_post( WRC_EVENT_PTP_MODE_CHANGED );
}
prev_ptp_mode = mode;
......@@ -259,11 +258,11 @@ static void wrc_dispatch_ptp_events_poll(void)
prev_ptp_state = ppi->state;
prev_servo_state = ss->state;
}
extern void wrc_log_stats(void);
return 1;
}
static void create_tasks()
static void create_tasks(void)
{
struct wrc_task *t;
......
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