1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2025-01-18 12:52:44 +01:00

Fix all warnings for native and qemu-i386

Missing returns, unused variables (only used for debugging), empty
translation units, missing function prototypes, and GNU extensions.
This commit is contained in:
René Kijewski 2014-06-20 20:00:20 +02:00
parent 6ed3cf182b
commit 3063e3c2b1
17 changed files with 25 additions and 7 deletions

View File

@ -65,6 +65,7 @@ extern int (*real_fork)(void);
extern int (*real_dup2)(int, int);
extern int (*real_unlink)(const char *);
extern int (*real_execve)(const char *, char *const[], char *const[]);
extern int (*real_pause)(void);
/**
* data structures

View File

@ -80,7 +80,7 @@ void _native_lpm_sleep(void)
/* otherwise select was interrupted because of a signal, continue below */
#else
_native_in_syscall++; // no switching here
pause();
real_pause();
_native_in_syscall--;
#endif

View File

@ -205,6 +205,7 @@ __attribute__((constructor)) static void startup(int argc, char **argv)
*(void **)(&real_dup2) = dlsym(RTLD_NEXT, "dup2");
*(void **)(&real_unlink) = dlsym(RTLD_NEXT, "unlink");
*(void **)(&real_execve) = dlsym(RTLD_NEXT, "execve");
*(void **)(&real_pause) = dlsym(RTLD_NEXT, "pause");
_native_argv = argv;
_progname = argv[0];

View File

@ -60,6 +60,7 @@ int (*real_fork)(void);
int (*real_dup2)(int, int);
int (*real_unlink)(const char *);
int (*real_execve)(const char *, char *const[], char *const[]);
int (*real_pause)(void);
void _native_syscall_enter(void)
{

View File

@ -98,6 +98,8 @@ void rpl_udp_monitor(void)
if (ipv6_buf->nextheader == IPV6_PROTO_NUM_ICMPV6) {
DEBUG("\t ICMP type: %02X ", icmp_type);
DEBUG("\t ICMP code: %02X ", icmp_code);
(void) icmp_type;
(void) icmp_code;
}
printf("\n");

View File

@ -707,5 +707,8 @@ Bail:
return -1;
}
#endif // USE_FRAG
// eof
#else // USE_FRAG
static int dummy __attribute__((unused));
#endif

View File

@ -55,9 +55,9 @@ typedef struct __attribute__((packed)) {
uint16_t dst_port; ///< destination port
uint32_t seq_nr; ///< sequence number
uint32_t ack_nr; ///< acknowledgement number
uint8_t flag_ns :1; ///< ECN-nonce concealment protection (since RFC 3540).
uint8_t reserved :3; ///< for future use - set to zero
uint8_t data_offset :4;
unsigned flag_ns :1; ///< ECN-nonce concealment protection (since RFC 3540).
unsigned reserved :3; ///< for future use - set to zero
unsigned data_offset :4;
uint8_t reserved_flags; ///< TODO: break this down into another bitfield: flag_fin, flag_syn, etc
uint16_t window; ///< receiver window
/**

View File

@ -1144,6 +1144,8 @@ void recv_nbr_sol(void)
}
}
}
(void) aro_state;
}
break;

View File

@ -985,6 +985,7 @@ void rpl_send(ipv6_addr_t *destination, uint8_t *payload, uint16_t p_len, uint8_
ipv6_send_packet(ipv6_send_buf);
}
(void) packet_length;
}
ipv6_addr_t *rpl_get_next_hop(ipv6_addr_t *addr)

View File

@ -160,4 +160,5 @@ int main(void)
puts("#########################");
test2();
puts("#########################");
return 0;
}

View File

@ -40,4 +40,5 @@ int main(void)
}
puts("done");
return 0;
}

View File

@ -43,7 +43,7 @@ static void *run(void *id_)
pthread_barrier_wait(&barrier);
uint32_t timeout_us = genrand_uint32() % 2500000;
printf("Child %i sleeps for % 8" PRIu32 " µs.\n", id, timeout_us);
printf("Child %i sleeps for %8" PRIu32 " µs.\n", id, timeout_us);
vtimer_usleep(timeout_us);
}

View File

@ -36,4 +36,5 @@ int main(void)
{
(void) thread_create(t2_stack, STACK_SIZE, PRIORITY_MAIN - 1, CREATE_WOUT_YIELD | CREATE_STACKTEST, second_thread, "nr2");
puts("first thread\n");
return 0;
}

View File

@ -86,4 +86,5 @@ int main(void)
}
puts("main: exiting");
return 0;
}

View File

@ -82,4 +82,5 @@ int main(void)
p3 = thread_create(t3_stack, KERNEL_CONF_STACKSIZE_PRINTF, PRIORITY_MAIN - 1,
CREATE_WOUT_YIELD | CREATE_STACKTEST, thread3, "nr3");
puts("THREADS CREATED\n");
return 0;
}

View File

@ -62,4 +62,5 @@ int main(void)
msg_receive(&msg);
printf("MAIN THREAD %u ALIVE!\n", p_main);
return 0;
}

View File

@ -59,4 +59,5 @@ int main(void)
msg_receive(&msg);
printf("MAIN THREAD %u ALIVE!\n", p_main);
return 0;
}