Browse Source

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.
dev/timer
René Kijewski 9 years ago
parent
commit
3063e3c2b1
  1. 1
      cpu/native/include/native_internal.h
  2. 2
      cpu/native/lpm_cpu.c
  3. 1
      cpu/native/startup.c
  4. 1
      cpu/native/syscalls.c
  5. 2
      examples/rpl_udp/helper.c
  6. 7
      sys/net/ccn_lite/ccnl-ext-frag.c
  7. 6
      sys/net/include/destiny/types.h
  8. 2
      sys/net/network_layer/sixlowpan/icmp.c
  9. 1
      sys/net/routing/rpl/rpl.c
  10. 1
      tests/test_posix_semaphore/main.c
  11. 1
      tests/test_posix_sleep/main.c
  12. 2
      tests/test_pthread_barrier/main.c
  13. 1
      tests/test_thread_basic/main.c
  14. 1
      tests/test_thread_exit/main.c
  15. 1
      tests/test_thread_msg/main.c
  16. 1
      tests/test_thread_msg_block_w_queue/main.c
  17. 1
      tests/test_thread_msg_block_wo_queue/main.c

1
cpu/native/include/native_internal.h

@ -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

2
cpu/native/lpm_cpu.c

@ -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

1
cpu/native/startup.c

@ -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];

1
cpu/native/syscalls.c

@ -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)
{

2
examples/rpl_udp/helper.c

@ -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");

7
sys/net/ccn_lite/ccnl-ext-frag.c

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

6
sys/net/include/destiny/types.h

@ -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
/**

2
sys/net/network_layer/sixlowpan/icmp.c

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

1
sys/net/routing/rpl/rpl.c

@ -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)

1
tests/test_posix_semaphore/main.c

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

1
tests/test_posix_sleep/main.c

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

2
tests/test_pthread_barrier/main.c

@ -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);
}

1
tests/test_thread_basic/main.c

@ -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;
}

1
tests/test_thread_exit/main.c

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

1
tests/test_thread_msg/main.c

@ -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;
}

1
tests/test_thread_msg_block_w_queue/main.c

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

1
tests/test_thread_msg_block_wo_queue/main.c

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

Loading…
Cancel
Save