Merge pull request #1364 from simonduq/pr/last-warnings

Last compiler warnings
This commit is contained in:
Simon Duquennoy 2015-11-10 15:50:11 +01:00
commit 729c4f9cf1
3 changed files with 6 additions and 3 deletions

View file

@ -52,6 +52,8 @@
#include "www.h" #include "www.h"
/* Explicitly declare itoa as it is non-standard and not necessarily in stdlib.h */
char *itoa(int value, char *str, int base);
/* The array that holds the current URL. */ /* The array that holds the current URL. */
static char url[WWW_CONF_MAX_URLLEN + 1]; static char url[WWW_CONF_MAX_URLLEN + 1];

View file

@ -107,7 +107,7 @@ init(void)
slip_set_input_callback(slip_input_callback); slip_set_input_callback(slip_input_callback);
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
static void static int
output(void) output(void)
{ {
if(uip_ipaddr_cmp(&last_sender, &UIP_IP_BUF->srcipaddr)) { if(uip_ipaddr_cmp(&last_sender, &UIP_IP_BUF->srcipaddr)) {
@ -123,6 +123,7 @@ output(void)
slip_send(); slip_send();
printf("\n"); printf("\n");
} }
return 0;
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
#if !SLIP_BRIDGE_CONF_NO_PUTCHAR #if !SLIP_BRIDGE_CONF_NO_PUTCHAR

View file

@ -169,14 +169,14 @@ PROCESS_THREAD(wget_process, ev, data)
strcpy(url, contiki_argv[1]); strcpy(url, contiki_argv[1]);
puts(url); puts(url);
} else { } else {
gets(url); fgets(url, sizeof(url), stdin);
} }
fputs("Save as:", stdout); fputs("Save as:", stdout);
if(contiki_argc > 2) { if(contiki_argc > 2) {
strcpy(name, contiki_argv[2]); strcpy(name, contiki_argv[2]);
puts(name); puts(name);
} else { } else {
gets(name); fgets(name, sizeof(name), stdin);
} }
file = cfs_open(name, CFS_WRITE); file = cfs_open(name, CFS_WRITE);
if(file == -1) { if(file == -1) {