Avoid compiler warnings.

This commit is contained in:
oliverschmidt 2006-08-14 23:31:40 +00:00
parent a99f0ca352
commit 5bd04b9c0d
4 changed files with 18 additions and 17 deletions

View File

@ -29,7 +29,7 @@
*
* This file is part of the Contiki desktop environment
*
* $Id: htmlparser.c,v 1.1 2006/06/17 22:41:13 adamdunkels Exp $
* $Id: htmlparser.c,v 1.2 2006/08/14 23:31:40 oliverschmidt Exp $
*
*/
@ -412,7 +412,7 @@ parse_tag(void)
newline();
add_char(ISO_rbrack);
do_word();
htmlparser_link((char *)html_frame, strlen(html_frame), s.tagattrparam);
htmlparser_link((char *)html_frame, (unsigned char)strlen(html_frame), s.tagattrparam);
PRINTF(("Frame [%s]\n", s.tagattrparam));
add_char(ISO_lbrack);
newline();
@ -843,7 +843,7 @@ htmlparser_parse(char *data, u16_t datalen)
if(datalen > 255) {
plen = parse_word(data, 255);
} else {
plen = parse_word(data, datalen);
plen = parse_word(data, (u8_t)datalen);
}
datalen -= plen;
data += plen;

View File

@ -29,7 +29,7 @@
*
* This file is part of the "contiki" web browser.
*
* $Id: webclient.c,v 1.1 2006/06/17 22:41:14 adamdunkels Exp $
* $Id: webclient.c,v 1.2 2006/08/14 23:32:29 oliverschmidt Exp $
*
*/
@ -116,8 +116,8 @@ init_connection(void)
sizeof(http_crnl) - 1 +
sizeof(http_host) - 1 +
sizeof(http_crnl) - 1 +
strlen(http_user_agent_fields) +
strlen(s.file) + strlen(s.host);
(u16_t)strlen(http_user_agent_fields) +
(u16_t)strlen(s.file) + (u16_t)strlen(s.host);
s.getrequestptr = 0;
s.httpheaderlineptr = 0;
@ -146,7 +146,7 @@ webclient_get(char *host, u16_t port, char *file)
}
}
conn = tcp_connect(ipaddr, htons(port), NULL);
conn = tcp_connect((uip_ipaddr_t *)ipaddr, htons(port), NULL);
if(conn == NULL) {
return 0;
@ -178,18 +178,18 @@ senddata(void)
cptr = getrequest = (char *)uip_appdata;
cptr = copy_string(cptr, http_get, sizeof(http_get) - 1);
cptr = copy_string(cptr, s.file, strlen(s.file));
cptr = copy_string(cptr, s.file, (unsigned char)strlen(s.file));
*cptr++ = ISO_space;
cptr = copy_string(cptr, http_10, sizeof(http_10) - 1);
cptr = copy_string(cptr, http_crnl, sizeof(http_crnl) - 1);
cptr = copy_string(cptr, http_host, sizeof(http_host) - 1);
cptr = copy_string(cptr, s.host, strlen(s.host));
cptr = copy_string(cptr, s.host, (unsigned char)strlen(s.host));
cptr = copy_string(cptr, http_crnl, sizeof(http_crnl) - 1);
cptr = copy_string(cptr, http_user_agent_fields,
strlen(http_user_agent_fields));
(unsigned char)strlen(http_user_agent_fields));
len = s.getrequestleft > uip_mss()?
uip_mss():

View File

@ -29,7 +29,7 @@
*
* This file is part of the Contiki desktop environment
*
* $Id: www.c,v 1.1 2006/06/17 22:41:14 adamdunkels Exp $
* $Id: www.c,v 1.2 2006/08/14 23:33:26 oliverschmidt Exp $
*
*/
@ -41,6 +41,7 @@
#include "htmlparser.h"
#include "http-strings.h"
#include "sys/arg.h"
#include "lib/petsciiconv.h"
#include "program-handler.h"
@ -853,7 +854,7 @@ htmlparser_submitbutton(char *text, char *name,
{
register struct formattribs *form;
form = add_pagewidget(text, strlen(text), CTK_WIDGET_BUTTON, 1);
form = add_pagewidget(text, (unsigned char)strlen(text), CTK_WIDGET_BUTTON, 1);
if(form != NULL) {
strncpy(form->formaction, formaction, WWW_CONF_MAX_FORMACTIONLEN);
strncpy(form->formname, formname, WWW_CONF_MAX_FORMNAMELEN);
@ -870,7 +871,7 @@ htmlparser_inputfield(char *text, char *name,
{
register struct formattribs *form;
form = add_pagewidget(text, strlen(text), CTK_WIDGET_TEXTENTRY, 1);
form = add_pagewidget(text, (unsigned char)strlen(text), CTK_WIDGET_TEXTENTRY, 1);
if(form != NULL) {
strncpy(form->formaction, formaction, WWW_CONF_MAX_FORMACTIONLEN);
strncpy(form->formname, formname, WWW_CONF_MAX_FORMNAMELEN);

View File

@ -57,7 +57,7 @@
*
* This file is part of the uIP TCP/IP stack.
*
* $Id: resolv.c,v 1.2 2006/08/09 16:13:39 bg- Exp $
* $Id: resolv.c,v 1.3 2006/08/14 23:37:21 oliverschmidt Exp $
*
*/
@ -262,7 +262,7 @@ newdata(void)
/* The ID in the DNS header should be our entry into the name
table. */
i = htons(hdr->id);
i = (u8_t)htons(hdr->id);
namemapptr = &names[i];
if(i < RESOLV_ENTRIES &&
namemapptr->state == STATE_ASKING) {
@ -280,8 +280,8 @@ newdata(void)
/* We only care about the question(s) and the answers. The authrr
and the extrarr are simply discarded. */
nquestions = htons(hdr->numquestions);
nanswers = htons(hdr->numanswers);
nquestions = (u8_t)htons(hdr->numquestions);
nanswers = (u8_t)htons(hdr->numanswers);
/* Skip the name in the question. XXX: This should really be
checked agains the name in the question, to be sure that they