unixsim: fixed various compiler warnings
missing prototype, unused functions, unused parameters
This commit is contained in:
parent
85121abb78
commit
f2e83197ff
|
@ -78,5 +78,29 @@ sio_status_t * sio_open( int devnum );
|
|||
*/
|
||||
void sio_change_baud( sioBaudrates baud, sio_status_t * siostat );
|
||||
|
||||
#if PPP_SUPPORT
|
||||
/**
|
||||
* Write buffer to serial port
|
||||
* @param siostat siostatus struct, contains sio instance data, given by sio_open
|
||||
* @param buf output buffer
|
||||
* @param size output buffer size
|
||||
*/
|
||||
u32_t sio_write(sio_status_t * siostat, u8_t *buf, u32_t size);
|
||||
|
||||
/**
|
||||
* Read buffer from serial port
|
||||
* @param siostat siostatus struct, contains sio instance data, given by sio_open
|
||||
* @param buf input buffer
|
||||
* @param size input buffer size
|
||||
*/
|
||||
u32_t sio_read(sio_status_t * siostat, u8_t *buf, u32_t size);
|
||||
|
||||
/**
|
||||
* Flush serial port input buffer
|
||||
* @param siostat siostatus struct, contains sio instance data, given by sio_open
|
||||
*/
|
||||
void sio_read_abort(sio_status_t * siostat);
|
||||
#endif /* PPP_SUPPORT */
|
||||
|
||||
#endif
|
||||
|
||||
|
|
|
@ -99,6 +99,7 @@ static int sio_init( char * device, int devnum, sio_status_t * siostat )
|
|||
#endif
|
||||
int fd;
|
||||
LWIP_UNUSED_ARG(siostat);
|
||||
LWIP_UNUSED_ARG(devnum);
|
||||
|
||||
/* open the device to be non-blocking (read will return immediately) */
|
||||
fd = open( device, O_RDWR | O_NOCTTY | O_NONBLOCK );
|
||||
|
@ -278,6 +279,7 @@ u32_t sio_read(sio_status_t * siostat, u8_t *buf, u32_t size)
|
|||
|
||||
void sio_read_abort(sio_status_t * siostat)
|
||||
{
|
||||
LWIP_UNUSED_ARG(siostat);
|
||||
printf("sio_read_abort: not yet implemented for unix\n");
|
||||
}
|
||||
#endif /* PPP_SUPPORT */
|
||||
|
|
|
@ -580,18 +580,3 @@ sys_jiffies(void)
|
|||
usec /= 1000000L / HZ;
|
||||
return HZ * sec + usec;
|
||||
}
|
||||
|
||||
#if PPP_DEBUG
|
||||
|
||||
#include <stdarg.h>
|
||||
|
||||
void ppp_trace(int level, const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
|
||||
(void)level;
|
||||
va_start(args, format);
|
||||
vprintf(format, args);
|
||||
va_end(args);
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue