1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00

Merge pull request #182 from LudwigOrtmann/make_clang_happy

Fix some clang warnings in native
This commit is contained in:
Christian Mehlis 2013-08-31 00:25:35 -07:00
commit 16dbafe319
2 changed files with 14 additions and 9 deletions

View File

@ -44,18 +44,17 @@ void lpm_init(void)
void _native_lpm_sleep()
{
#ifdef MODULE_UART0
int retval, nfds;
int nfds;
/* set fds */
nfds = 0;
FD_ZERO(&_native_rfds);
nfds = _native_set_uart_fds();
nfds++;
retval = select(nfds, &_native_rfds, NULL, NULL, NULL);
DEBUG("_native_lpm_sleep: retval: %i\n", retval);
nfds = select(nfds, &_native_rfds, NULL, NULL, NULL);
DEBUG("_native_lpm_sleep: returned: %i\n", nfds);
if (retval != -1) {
if (nfds != -1) {
/* uart ready, handle input */
/* TODO: switch to ISR context */
_native_handle_uart0_input();

View File

@ -26,12 +26,10 @@
#define TEXT_SIZE (255) /* XXX: this aint enough for everybody */
char text_msg[TEXT_SIZE];
msg_t mesg;
transceiver_command_t tcmd;
void _nativenet_get_set_address_handler(char *addr)
{
msg_t mesg;
transceiver_command_t tcmd;
uint16_t a;
tcmd.transceivers = TRANSCEIVER_NATIVE;
@ -53,6 +51,8 @@ void _nativenet_get_set_address_handler(char *addr)
void _nativenet_get_set_channel_handler(char *chan)
{
msg_t mesg;
transceiver_command_t tcmd;
uint8_t c;
tcmd.transceivers = TRANSCEIVER_NATIVE;
@ -74,6 +74,10 @@ void _nativenet_get_set_channel_handler(char *chan)
void _nativenet_send_handler(char *pkt)
{
msg_t mesg;
transceiver_command_t tcmd;
char text_msg[TEXT_SIZE];
radio_packet_t p;
uint32_t response;
uint16_t addr;
@ -109,6 +113,8 @@ void _nativenet_send_handler(char *pkt)
void _nativenet_monitor_handler(char *mode)
{
msg_t mesg;
transceiver_command_t tcmd;
uint8_t m;
tcmd.transceivers = TRANSCEIVER_NATIVE;