mirror of
https://github.com/RIOT-OS/RIOT.git
synced 2025-01-18 12:52:44 +01:00
sys/newlib/syscalls: fix warnings
- rx_cb: unused-parameter - _write_r: sign-compare - all stubbed syscalls: unused-parameter
This commit is contained in:
parent
1c855cb230
commit
0eaeca3640
@ -64,17 +64,17 @@ static ringbuffer_t rx_buf;
|
||||
*/
|
||||
void rx_cb(void *arg, char data)
|
||||
{
|
||||
#ifndef MODULE_UART0
|
||||
(void)arg;
|
||||
|
||||
ringbuffer_add_one(&rx_buf, data);
|
||||
mutex_unlock(&uart_rx_mutex);
|
||||
#else
|
||||
#ifdef MODULE_UART0
|
||||
if (uart0_handler_pid) {
|
||||
uart0_handle_incoming(data);
|
||||
|
||||
uart0_notify_thread();
|
||||
}
|
||||
#else
|
||||
ringbuffer_add_one(&rx_buf, data);
|
||||
mutex_unlock(&uart_rx_mutex);
|
||||
#endif
|
||||
}
|
||||
|
||||
@ -162,6 +162,8 @@ int _getpid(void)
|
||||
__attribute__ ((weak))
|
||||
int _kill_r(struct _reent *r, int pid, int sig)
|
||||
{
|
||||
(void) pid;
|
||||
(void) sig;
|
||||
r->_errno = ESRCH; /* not implemented yet */
|
||||
return -1;
|
||||
}
|
||||
@ -177,6 +179,8 @@ int _kill_r(struct _reent *r, int pid, int sig)
|
||||
*/
|
||||
int _open_r(struct _reent *r, const char *name, int mode)
|
||||
{
|
||||
(void) name;
|
||||
(void) mode;
|
||||
r->_errno = ENODEV; /* not implemented yet */
|
||||
return -1;
|
||||
}
|
||||
@ -229,13 +233,15 @@ int _read_r(struct _reent *r, int fd, void *buffer, unsigned int count)
|
||||
*/
|
||||
int _write_r(struct _reent *r, int fd, const void *data, unsigned int count)
|
||||
{
|
||||
int i = 0;
|
||||
(void) r;
|
||||
(void) fd;
|
||||
unsigned int i = 0;
|
||||
|
||||
while (i < count) {
|
||||
uart_write_blocking(STDIO, ((char*)data)[i++]);
|
||||
}
|
||||
|
||||
return i;
|
||||
return (int)i;
|
||||
}
|
||||
|
||||
/**
|
||||
@ -248,6 +254,7 @@ int _write_r(struct _reent *r, int fd, const void *data, unsigned int count)
|
||||
*/
|
||||
int _close_r(struct _reent *r, int fd)
|
||||
{
|
||||
(void) fd;
|
||||
r->_errno = ENODEV; /* not implemented yet */
|
||||
return -1;
|
||||
}
|
||||
@ -264,6 +271,9 @@ int _close_r(struct _reent *r, int fd)
|
||||
*/
|
||||
_off_t _lseek_r(struct _reent *r, int fd, _off_t pos, int dir)
|
||||
{
|
||||
(void) fd;
|
||||
(void) pos;
|
||||
(void) dir;
|
||||
r->_errno = ENODEV; /* not implemented yet */
|
||||
return -1;
|
||||
}
|
||||
@ -277,8 +287,10 @@ _off_t _lseek_r(struct _reent *r, int fd, _off_t pos, int dir)
|
||||
*
|
||||
* @return TODO
|
||||
*/
|
||||
int _fstat_r(struct _reent *r, int fd, struct stat * st)
|
||||
int _fstat_r(struct _reent *r, int fd, struct stat *st)
|
||||
{
|
||||
(void) fd;
|
||||
(void) st;
|
||||
r->_errno = ENODEV; /* not implemented yet */
|
||||
return -1;
|
||||
}
|
||||
@ -294,6 +306,8 @@ int _fstat_r(struct _reent *r, int fd, struct stat * st)
|
||||
*/
|
||||
int _stat_r(struct _reent *r, char *name, struct stat *st)
|
||||
{
|
||||
(void) name;
|
||||
(void) st;
|
||||
r->_errno = ENODEV; /* not implemented yet */
|
||||
return -1;
|
||||
}
|
||||
@ -325,8 +339,9 @@ int _isatty_r(struct _reent *r, int fd)
|
||||
*
|
||||
* @return TODO
|
||||
*/
|
||||
int _unlink_r(struct _reent *r, char* path)
|
||||
int _unlink_r(struct _reent *r, char *path)
|
||||
{
|
||||
(void) path;
|
||||
r->_errno = ENODEV; /* not implemented yet */
|
||||
return -1;
|
||||
}
|
||||
@ -342,6 +357,8 @@ int _unlink_r(struct _reent *r, char* path)
|
||||
__attribute__ ((weak))
|
||||
int _kill(int pid, int sig)
|
||||
{
|
||||
(void) pid;
|
||||
(void) sig;
|
||||
errno = ESRCH; /* not implemented yet */
|
||||
return -1;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user