From d9eebf7e17c76f37d4c4fc4e4633f79681ce41cf Mon Sep 17 00:00:00 2001 From: adamdunkels Date: Sat, 17 Nov 2007 10:46:25 +0000 Subject: [PATCH] Fixed compiler warnings --- core/lib/print-stats.c | 6 +++--- core/loader/elfloader-stub.c | 9 +++++++-- core/net/uip-fw.c | 4 +++- platform/native/contiki-main.c | 4 ++-- 4 files changed, 15 insertions(+), 8 deletions(-) diff --git a/core/lib/print-stats.c b/core/lib/print-stats.c index e2a27b4d6..f9681f9c0 100644 --- a/core/lib/print-stats.c +++ b/core/lib/print-stats.c @@ -28,7 +28,7 @@ * * This file is part of the Contiki operating system. * - * $Id: print-stats.c,v 1.2 2007/11/12 22:27:44 adamdunkels Exp $ + * $Id: print-stats.c,v 1.3 2007/11/17 10:46:25 adamdunkels Exp $ */ /** @@ -49,9 +49,9 @@ void print_stats(void) { - printf("S %d.%d clock %u tx %lu rx %lu rtx %lu rrx %lu rexmit %lu acktx %lu noacktx %lu ackrx %lu timedout %lu badackrx %lu toolong %lu tooshort %lu badsynch %lu badcrc %lu contentiondrop %lu sendingdrop %lu lltx %lu llrx %lu\n", + printf("S %d.%d clock %lu tx %lu rx %lu rtx %lu rrx %lu rexmit %lu acktx %lu noacktx %lu ackrx %lu timedout %lu badackrx %lu toolong %lu tooshort %lu badsynch %lu badcrc %lu contentiondrop %lu sendingdrop %lu lltx %lu llrx %lu\n", rimeaddr_node_addr.u8[0], rimeaddr_node_addr.u8[1], - clock_time() / CLOCK_SECOND, + (unsigned long)clock_time() / CLOCK_SECOND, rimestats.tx, rimestats.rx, rimestats.reliabletx, rimestats.reliablerx, rimestats.rexmit, rimestats.acktx, rimestats.noacktx, diff --git a/core/loader/elfloader-stub.c b/core/loader/elfloader-stub.c index 08352a70e..c59678d88 100644 --- a/core/loader/elfloader-stub.c +++ b/core/loader/elfloader-stub.c @@ -28,10 +28,12 @@ * * This file is part of the Contiki operating system. * - * @(#)$Id: elfloader-stub.c,v 1.2 2006/12/18 14:54:04 fros4943 Exp $ + * @(#)$Id: elfloader-stub.c,v 1.3 2007/11/17 10:46:41 adamdunkels Exp $ */ #include "elfloader-arch.h" +#include + static char datamemory[ELFLOADER_DATAMEMORY_SIZE]; static const char textmemory[ELFLOADER_TEXTMEMORY_SIZE] = {0}; /*---------------------------------------------------------------------------*/ @@ -58,6 +60,9 @@ elfloader_arch_relocate(int fd, unsigned int sectionoffset, char *sectionaddr, struct elf32_rela *rela, char *addr) { - printf("elfloader_arch_relocate: sectionoffset 0x%04x, sectionaddr %p, r_offset 0x%04x, r_info 0x%04x, r_addend 0x%04x, addr %p\n", sectionoffset, sectionaddr, rela->r_offset, rela->r_info, rela->r_addend, addr); + printf("elfloader_arch_relocate: sectionoffset 0x%04x, sectionaddr %p, r_offset 0x%04x, r_info 0x%04x, r_addend 0x%04x, addr %p\n", + sectionoffset, sectionaddr, + (unsigned int)rela->r_offset, (unsigned int)rela->r_info, + (unsigned int)rela->r_addend, addr); } /*---------------------------------------------------------------------------*/ diff --git a/core/net/uip-fw.c b/core/net/uip-fw.c index 7f56fec76..57293b8fd 100644 --- a/core/net/uip-fw.c +++ b/core/net/uip-fw.c @@ -30,7 +30,7 @@ * * Author: Adam Dunkels * - * $Id: uip-fw.c,v 1.7 2007/08/22 10:47:37 ksb Exp $ + * $Id: uip-fw.c,v 1.8 2007/11/17 10:46:58 adamdunkels Exp $ */ /** * \addtogroup uip @@ -360,7 +360,9 @@ u8_t uip_fw_output(void) { struct uip_fw_netif *netif; +#if UIP_BROADCAST const struct uip_udpip_hdr *udp = (void *)BUF; +#endif /* UIP_BROADCAST */ if(uip_len == 0) { return UIP_FW_ZEROLEN; diff --git a/platform/native/contiki-main.c b/platform/native/contiki-main.c index 13e16bac2..ab9d9f1ea 100644 --- a/platform/native/contiki-main.c +++ b/platform/native/contiki-main.c @@ -29,7 +29,7 @@ * * This file is part of the Contiki OS * - * $Id: contiki-main.c,v 1.3 2007/05/22 21:33:31 oliverschmidt Exp $ + * $Id: contiki-main.c,v 1.4 2007/11/17 10:47:47 adamdunkels Exp $ * */ @@ -58,7 +58,7 @@ main(void) procinit_init(); - autostart_start(autostart_processes); + autostart_start((struct process **)autostart_processes); uip_ipaddr(&addr, 192,168,2,2); uip_sethostaddr(&addr);