mirror of
https://github.com/oliverschmidt/contiki.git
synced 2024-12-21 19:29:18 +00:00
Fix compiler warnings
This commit is contained in:
parent
08c6a69fe8
commit
c262eafe97
@ -200,7 +200,7 @@ window_copy(int curptr, const char *data, unsigned char datalen)
|
|||||||
len = windowend - windowstart;
|
len = windowend - windowstart;
|
||||||
}
|
}
|
||||||
|
|
||||||
strncpy(windowptr + windowstart, data, len);
|
strncpy((char *)(windowptr + windowstart), data, len);
|
||||||
windowstart += len;
|
windowstart += len;
|
||||||
|
|
||||||
return curptr + datalen;
|
return curptr + datalen;
|
||||||
@ -217,7 +217,7 @@ senddata(void)
|
|||||||
windowstart = s.getrequestptr;
|
windowstart = s.getrequestptr;
|
||||||
curptr = 0;
|
curptr = 0;
|
||||||
windowend = windowstart + uip_mss();
|
windowend = windowstart + uip_mss();
|
||||||
windowptr = (char *)uip_appdata - windowstart;
|
windowptr = (unsigned char *)uip_appdata - windowstart;
|
||||||
|
|
||||||
curptr = window_copy(curptr, http_get, sizeof(http_get) - 1);
|
curptr = window_copy(curptr, http_get, sizeof(http_get) - 1);
|
||||||
curptr = window_copy(curptr, s.file, (unsigned char)strlen(s.file));
|
curptr = window_copy(curptr, s.file, (unsigned char)strlen(s.file));
|
||||||
|
@ -864,6 +864,7 @@ htmlparser_newline(void)
|
|||||||
|
|
||||||
wptr = webpageptr - WWW_CONF_WEBPAGE_WIDTH;
|
wptr = webpageptr - WWW_CONF_WEBPAGE_WIDTH;
|
||||||
petsciiconv_topetscii(wptr, WWW_CONF_WEBPAGE_WIDTH);
|
petsciiconv_topetscii(wptr, WWW_CONF_WEBPAGE_WIDTH);
|
||||||
|
(void)wptr;
|
||||||
|
|
||||||
if(y == WWW_CONF_WEBPAGE_HEIGHT) {
|
if(y == WWW_CONF_WEBPAGE_HEIGHT) {
|
||||||
loading = 0;
|
loading = 0;
|
||||||
|
@ -80,7 +80,7 @@ urlconv_tofilename(char *dest, char *source, unsigned char maxlen)
|
|||||||
*dest = ISO_slash;
|
*dest = ISO_slash;
|
||||||
strncpy(dest + 1, wwwroot, wwwrootlen);
|
strncpy(dest + 1, wwwroot, wwwrootlen);
|
||||||
len = 0;
|
len = 0;
|
||||||
from = source; to = dest + wwwrootlen;
|
from = (unsigned char *)source; to = (unsigned char *)dest + wwwrootlen;
|
||||||
maxlen -= 2 + wwwrootlen;
|
maxlen -= 2 + wwwrootlen;
|
||||||
do {
|
do {
|
||||||
c = *(from++);
|
c = *(from++);
|
||||||
@ -139,7 +139,7 @@ urlconv_tofilename(char *dest, char *source, unsigned char maxlen)
|
|||||||
}
|
}
|
||||||
} while(c);
|
} while(c);
|
||||||
if(*to == ISO_slash && (len + sizeof(http_index_htm) - 3) < maxlen) {
|
if(*to == ISO_slash && (len + sizeof(http_index_htm) - 3) < maxlen) {
|
||||||
strcpy(to, http_index_htm); // add index.htm
|
strcpy((char *)to, http_index_htm); // add index.htm
|
||||||
} else {
|
} else {
|
||||||
++to;
|
++to;
|
||||||
*to = 0;
|
*to = 0;
|
||||||
|
@ -155,14 +155,14 @@ ctk_filedialog_eventhandler(struct ctk_filedialog_state *s,
|
|||||||
}
|
}
|
||||||
return 1;
|
return 1;
|
||||||
} else if(ev == ctk_signal_keypress) {
|
} else if(ev == ctk_signal_keypress) {
|
||||||
if((ctk_arch_key_t)data == CH_CURS_UP) {
|
if((unsigned long)data == CH_CURS_UP) {
|
||||||
clearptr();
|
clearptr();
|
||||||
if(fileptr > 0) {
|
if(fileptr > 0) {
|
||||||
--fileptr;
|
--fileptr;
|
||||||
}
|
}
|
||||||
showptr();
|
showptr();
|
||||||
return 1;
|
return 1;
|
||||||
} else if((ctk_arch_key_t)data == CH_CURS_DOWN) {
|
} else if((unsigned long)data == CH_CURS_DOWN) {
|
||||||
clearptr();
|
clearptr();
|
||||||
if(fileptr < FILES_HEIGHT - 1) {
|
if(fileptr < FILES_HEIGHT - 1) {
|
||||||
++fileptr;
|
++fileptr;
|
||||||
|
Loading…
Reference in New Issue
Block a user