From 26ed3732876a649fb02a83e768e4392034d65653 Mon Sep 17 00:00:00 2001 From: gdisirio Date: Sat, 17 Oct 2009 10:33:37 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@1229 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/ARM7-AT91SAM7X-GCC/Makefile | 4 ++-- demos/ARM7-AT91SAM7X-GCC/main.c | 5 ++++- demos/ARM7-AT91SAM7X-LWIP-GCC/Makefile | 4 ++-- demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/arch/sys_arch.c | 2 ++ demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/lwipthread.c | 2 ++ demos/ARM7-AT91SAM7X-LWIP-GCC/main.c | 4 ++++ demos/ARM7-AT91SAM7X-LWIP-GCC/web/web.c | 6 ++++-- demos/ARM7-AT91SAM7X-UIP-GCC/Makefile | 4 ++-- demos/ARM7-AT91SAM7X-UIP-GCC/main.c | 4 ++++ demos/ARM7-AT91SAM7X-UIP-GCC/web/webthread.c | 5 +++++ 10 files changed, 31 insertions(+), 9 deletions(-) (limited to 'demos') diff --git a/demos/ARM7-AT91SAM7X-GCC/Makefile b/demos/ARM7-AT91SAM7X-GCC/Makefile index fa6f56c8c..65a658661 100644 --- a/demos/ARM7-AT91SAM7X-GCC/Makefile +++ b/demos/ARM7-AT91SAM7X-GCC/Makefile @@ -125,10 +125,10 @@ AOPT = TOPT = -mthumb -DTHUMB # Define C warning options here -CWARN = -Wall -Wstrict-prototypes +CWARN = -Wall -Wextra -Wstrict-prototypes # Define C++ warning options here -CPPWARN = -Wall +CPPWARN = -Wall -Wextra # # Compiler settings diff --git a/demos/ARM7-AT91SAM7X-GCC/main.c b/demos/ARM7-AT91SAM7X-GCC/main.c index f6c297a41..36ae17fae 100644 --- a/demos/ARM7-AT91SAM7X-GCC/main.c +++ b/demos/ARM7-AT91SAM7X-GCC/main.c @@ -25,8 +25,9 @@ #include "board.h" static WORKING_AREA(waThread1, 64); -static msg_t Thread1(void *arg) { +static msg_t Thread1(void *p) { + (void)p; while (TRUE) { palSetPad(IOPORT2, PIOB_LCD_BL); chThdSleepMilliseconds(100); @@ -41,6 +42,8 @@ static msg_t Thread1(void *arg) { * on entry. */ int main(int argc, char **argv) { + (void)argc; + (void)argv; /* * Activates the serial driver 1 using the driver default configuration. diff --git a/demos/ARM7-AT91SAM7X-LWIP-GCC/Makefile b/demos/ARM7-AT91SAM7X-LWIP-GCC/Makefile index 62a8d217c..699a8c834 100644 --- a/demos/ARM7-AT91SAM7X-LWIP-GCC/Makefile +++ b/demos/ARM7-AT91SAM7X-LWIP-GCC/Makefile @@ -139,10 +139,10 @@ AOPT = TOPT = -mthumb -DTHUMB # Define C warning options here -CWARN = -Wall -Wstrict-prototypes +CWARN = -Wall -Wextra -Wstrict-prototypes # Define C++ warning options here -CPPWARN = -Wall +CPPWARN = -Wall -Wextra # # Compiler settings diff --git a/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/arch/sys_arch.c b/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/arch/sys_arch.c index 65b1b5314..0a78a3653 100644 --- a/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/arch/sys_arch.c +++ b/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/arch/sys_arch.c @@ -146,6 +146,7 @@ struct sys_timeouts *sys_arch_timeouts(void) { sys_thread_t sys_thread_new(char *name, void (* thread)(void *arg), void *arg, int stacksize, int prio) { + (void)name; size_t wsz = THD_WA_SIZE(stacksize); void *wsp = chCoreAlloc(wsz); if (wsp == NULL) @@ -161,5 +162,6 @@ sys_prot_t sys_arch_protect(void) { void sys_arch_unprotect(sys_prot_t pval) { + (void)pval; chSysUnlock(); } diff --git a/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/lwipthread.c b/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/lwipthread.c index c9752cb46..36ca3fd37 100644 --- a/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/lwipthread.c +++ b/demos/ARM7-AT91SAM7X-LWIP-GCC/lwip/lwipthread.c @@ -108,6 +108,7 @@ static err_t low_level_output(struct netif *netif, struct pbuf *p) { struct pbuf *q; MACTransmitDescriptor td; + (void)netif; if (macWaitTransmitDescriptor(Ð1, &td, MS2ST(LWIP_SEND_TIMEOUT)) != RDY_OK) return ERR_TIMEOUT; @@ -138,6 +139,7 @@ static struct pbuf *low_level_input(struct netif *netif) { struct pbuf *p, *q; u16_t len; + (void)netif; if (macWaitReceiveDescriptor(Ð1, &rd, TIME_IMMEDIATE) == RDY_OK) { len = (u16_t)rd.rd_size; diff --git a/demos/ARM7-AT91SAM7X-LWIP-GCC/main.c b/demos/ARM7-AT91SAM7X-LWIP-GCC/main.c index d7d1836da..14ac139d9 100644 --- a/demos/ARM7-AT91SAM7X-LWIP-GCC/main.c +++ b/demos/ARM7-AT91SAM7X-LWIP-GCC/main.c @@ -29,6 +29,7 @@ static WORKING_AREA(waThread1, 64); static msg_t Thread1(void *arg) { + (void)arg; while (TRUE) { palClearPad(IOPORT2, PIOB_LCD_BL); chThdSleepMilliseconds(900); @@ -44,6 +45,9 @@ static msg_t Thread1(void *arg) { */ int main(int argc, char **argv) { + (void)argc; + (void)argv; + /* * Activates the serial driver 1 using the driver default configuration. */ diff --git a/demos/ARM7-AT91SAM7X-LWIP-GCC/web/web.c b/demos/ARM7-AT91SAM7X-LWIP-GCC/web/web.c index 88701ce3e..c64f2e47d 100644 --- a/demos/ARM7-AT91SAM7X-LWIP-GCC/web/web.c +++ b/demos/ARM7-AT91SAM7X-LWIP-GCC/web/web.c @@ -39,8 +39,8 @@ #if LWIP_NETCONN -const static char http_html_hdr[] = "HTTP/1.1 200 OK\r\nContent-type: text/html\r\n\r\n"; -const static char http_index_html[] = "Congrats!

Welcome to our lwIP HTTP server!

This is a small test page."; +static const char http_html_hdr[] = "HTTP/1.1 200 OK\r\nContent-type: text/html\r\n\r\n"; +static const char http_index_html[] = "Congrats!

Welcome to our lwIP HTTP server!

This is a small test page."; static void http_server_serve(struct netconn *conn) { struct netbuf *inbuf; @@ -92,6 +92,8 @@ WORKING_AREA(wa_http_server, WEB_THREAD_STACK_SIZE); msg_t http_server(void *p) { struct netconn *conn, *newconn; + (void)p; + /* Create a new TCP connection handle */ conn = netconn_new(NETCONN_TCP); LWIP_ERROR("http_server: invalid conn", (conn != NULL), return RDY_RESET;); diff --git a/demos/ARM7-AT91SAM7X-UIP-GCC/Makefile b/demos/ARM7-AT91SAM7X-UIP-GCC/Makefile index 95d046fef..77695a569 100644 --- a/demos/ARM7-AT91SAM7X-UIP-GCC/Makefile +++ b/demos/ARM7-AT91SAM7X-UIP-GCC/Makefile @@ -143,10 +143,10 @@ AOPT = TOPT = -mthumb -DTHUMB # Define C warning options here -CWARN = -Wall -Wstrict-prototypes +CWARN = -Wall -Wextra -Wstrict-prototypes # Define C++ warning options here -CPPWARN = -Wall +CPPWARN = -Wall -Wextra # # Compiler settings diff --git a/demos/ARM7-AT91SAM7X-UIP-GCC/main.c b/demos/ARM7-AT91SAM7X-UIP-GCC/main.c index 0474ce008..5b366b0b0 100644 --- a/demos/ARM7-AT91SAM7X-UIP-GCC/main.c +++ b/demos/ARM7-AT91SAM7X-UIP-GCC/main.c @@ -31,6 +31,7 @@ static WORKING_AREA(waThread1, 128); static msg_t Thread1(void *arg) { + (void)arg; while (TRUE) { palSetPad(IOPORT2, PIOB_LCD_BL); chThdSleepMilliseconds(100); @@ -46,6 +47,9 @@ static msg_t Thread1(void *arg) { */ int main(int argc, char **argv) { + (void)argc; + (void)argv; + /* * Activates the serial driver 2 using the driver default configuration. */ diff --git a/demos/ARM7-AT91SAM7X-UIP-GCC/web/webthread.c b/demos/ARM7-AT91SAM7X-UIP-GCC/web/webthread.c index 12c3b8405..1be4df645 100644 --- a/demos/ARM7-AT91SAM7X-UIP-GCC/web/webthread.c +++ b/demos/ARM7-AT91SAM7X-UIP-GCC/web/webthread.c @@ -88,6 +88,7 @@ clock_time_t clock_time( void ) static void PeriodicTimerHandler(eventid_t id) { int i; + (void)id; for (i = 0; i < UIP_CONNS; i++) { uip_periodic(i); if (uip_len > 0) { @@ -102,6 +103,7 @@ static void PeriodicTimerHandler(eventid_t id) { */ static void ARPTimerHandler(eventid_t id) { + (void)id; (void)macPollLinkStatus(Ð1); uip_arp_timer(); } @@ -111,6 +113,7 @@ static void ARPTimerHandler(eventid_t id) { */ static void FrameReceivedHandler(eventid_t id) { + (void)id; while ((uip_len = network_device_read()) > 0) { if (BUF->type == HTONS(UIP_ETHTYPE_IP)) { uip_arp_ipin(); @@ -143,6 +146,8 @@ msg_t WebThread(void *p) { EventListener el0, el1, el2; uip_ipaddr_t ipaddr; + (void)p; + /* * Event sources setup. */ -- cgit v1.2.3