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;
|
||||
}
|
||||
|
||||
strncpy(windowptr + windowstart, data, len);
|
||||
strncpy((char *)(windowptr + windowstart), data, len);
|
||||
windowstart += len;
|
||||
|
||||
return curptr + datalen;
|
||||
@ -217,7 +217,7 @@ senddata(void)
|
||||
windowstart = s.getrequestptr;
|
||||
curptr = 0;
|
||||
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, s.file, (unsigned char)strlen(s.file));
|
||||
|
@ -864,6 +864,7 @@ htmlparser_newline(void)
|
||||
|
||||
wptr = webpageptr - WWW_CONF_WEBPAGE_WIDTH;
|
||||
petsciiconv_topetscii(wptr, WWW_CONF_WEBPAGE_WIDTH);
|
||||
(void)wptr;
|
||||
|
||||
if(y == WWW_CONF_WEBPAGE_HEIGHT) {
|
||||
loading = 0;
|
||||
|
@ -80,7 +80,7 @@ urlconv_tofilename(char *dest, char *source, unsigned char maxlen)
|
||||
*dest = ISO_slash;
|
||||
strncpy(dest + 1, wwwroot, wwwrootlen);
|
||||
len = 0;
|
||||
from = source; to = dest + wwwrootlen;
|
||||
from = (unsigned char *)source; to = (unsigned char *)dest + wwwrootlen;
|
||||
maxlen -= 2 + wwwrootlen;
|
||||
do {
|
||||
c = *(from++);
|
||||
@ -139,7 +139,7 @@ urlconv_tofilename(char *dest, char *source, unsigned char maxlen)
|
||||
}
|
||||
} while(c);
|
||||
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 {
|
||||
++to;
|
||||
*to = 0;
|
||||
|
@ -155,14 +155,14 @@ ctk_filedialog_eventhandler(struct ctk_filedialog_state *s,
|
||||
}
|
||||
return 1;
|
||||
} else if(ev == ctk_signal_keypress) {
|
||||
if((ctk_arch_key_t)data == CH_CURS_UP) {
|
||||
if((unsigned long)data == CH_CURS_UP) {
|
||||
clearptr();
|
||||
if(fileptr > 0) {
|
||||
--fileptr;
|
||||
}
|
||||
showptr();
|
||||
return 1;
|
||||
} else if((ctk_arch_key_t)data == CH_CURS_DOWN) {
|
||||
} else if((unsigned long)data == CH_CURS_DOWN) {
|
||||
clearptr();
|
||||
if(fileptr < FILES_HEIGHT - 1) {
|
||||
++fileptr;
|
||||
|
Loading…
Reference in New Issue
Block a user