Removed compiler warnings.

This commit is contained in:
oliverschmidt 2007-11-18 00:57:44 +00:00
parent 6d6edb418b
commit 84272a3dcb
4 changed files with 22 additions and 16 deletions

View file

@ -29,7 +29,7 @@
*
* This file is part of the Contiki desktop environment for the C64.
*
* $Id: email.c,v 1.2 2007/09/29 04:12:15 matsutsuka Exp $
* $Id: email.c,v 1.3 2007/11/18 00:57:44 oliverschmidt Exp $
*
*/
@ -128,24 +128,29 @@ static char smtpserver[40];
static struct ctk_textentry smtpservertextentry =
{CTK_TEXTENTRY(0, 4, 26, 1, smtpserver, 39)};
/*
static struct ctk_label pop3serverlabel =
{CTK_LABEL(0, 6, 20, 1, "Incoming mailserver")};
static char pop3server[40];
static struct ctk_textentry pop3servertextentry =
{CTK_TEXTENTRY(0, 7, 26, 1, pop3server, 39)};
*/
/*
static struct ctk_label pop3userlabel =
{CTK_LABEL(0, 9, 20, 1, "Mailserver username")};
static char pop3user[40];
static struct ctk_textentry pop3usertextentry =
{CTK_TEXTENTRY(0, 10, 26, 1, pop3user, 39)};
*/
/*
static struct ctk_label pop3passwordlabel =
{CTK_LABEL(0, 12, 20, 1, "Mailserver password")};
static char pop3password[40];
static struct ctk_textentry pop3passwordtextentry =
{CTK_TEXTENTRY(0, 13, 26, 1, pop3password, 39)};
*/
static struct ctk_button setupokbutton =
{CTK_BUTTON(24, 15, 2, "Ok")};

View file

@ -30,7 +30,7 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: smtp-socket.c,v 1.2 2006/08/21 21:32:24 oliverschmidt Exp $
* $Id: smtp-socket.c,v 1.3 2007/11/18 01:00:50 oliverschmidt Exp $
*/
#include "smtp.h"
@ -73,7 +73,7 @@ static u16_t smtpserver[2];
#define ISO_5 0x35
#define SEND_STRING(s, str) PSOCK_SEND(s, str, (unsigned char)strlen(str))
#define SEND_STRING(s, str) PSOCK_SEND(s, (uint8_t *)str, (unsigned char)strlen(str))
/*---------------------------------------------------------------------------*/
static
PT_THREAD(smtp_thread(void))
@ -227,7 +227,7 @@ smtp_send(char *to, char *cc, char *from, char *subject,
s.msgwidth = msgwidth;
s.msgheight = msgheight;
PSOCK_INIT(&s.psock, s.inputbuffer, sizeof(s.inputbuffer));
PSOCK_INIT(&s.psock, (uint8_t *)s.inputbuffer, sizeof(s.inputbuffer));
return 1;
}

View file

@ -30,18 +30,19 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: ftp.c,v 1.3 2007/09/29 04:12:15 matsutsuka Exp $
* $Id: ftp.c,v 1.4 2007/11/18 01:05:10 oliverschmidt Exp $
*/
/* Note to self: It would be nice to have a "View" option in the download dialog. */
#include <string.h>
#include <stddef.h>
#include "ftpc.h"
#include "contiki.h"
#include "ctk/ctk.h"
#include "cfs/cfs.h"
#include "net/resolv.h"
#include <string.h>
#define MAX_USERNAMELEN 16
#define MAX_PASSWORDLEN 16
#define MAX_HOSTNAMELEN 32
@ -451,7 +452,7 @@ PROCESS_THREAD(ftp_process, ev, data)
} else {
ptrstate = PTRSTATE_LOCALFILES;
}
} else */ if((ctk_arch_key_t)data == CH_CURS_UP) {
} else */ if((ctk_arch_key_t)(size_t)data == CH_CURS_UP) {
clearptr();
if(ptrstate == PTRSTATE_LOCALFILES) {
if(localptr > 0) {
@ -462,7 +463,7 @@ PROCESS_THREAD(ftp_process, ev, data)
--remoteptr;
}
}
} else if((ctk_arch_key_t)data == CH_CURS_DOWN) {
} else if((ctk_arch_key_t)(size_t)data == CH_CURS_DOWN) {
clearptr();
if(ptrstate == PTRSTATE_LOCALFILES) {
if(localptr < FILES_HEIGHT - 1) {
@ -473,7 +474,7 @@ PROCESS_THREAD(ftp_process, ev, data)
++remoteptr;
}
}
} else if((ctk_arch_key_t)data == CH_ENTER) {
} else if((ctk_arch_key_t)(size_t)data == CH_ENTER) {
if(ptrstate == PTRSTATE_LOCALFILES) {
strncpy(localfilename,
&localfiles[localptr * FILES_WIDTH], FILES_WIDTH);
@ -490,7 +491,7 @@ PROCESS_THREAD(ftp_process, ev, data)
/* make_downloaddialog();
ctk_dialog_open(&dialog);*/
}
} else if((ctk_arch_key_t)data == 'u') {
} else if((ctk_arch_key_t)(size_t)data == 'u') {
ftpc_cdup(connection);
}

View file

@ -30,7 +30,7 @@
*
* Author: Adam Dunkels <adam@sics.se>
*
* $Id: ircc.c,v 1.2 2006/08/21 21:39:49 oliverschmidt Exp $
* $Id: ircc.c,v 1.3 2007/11/18 01:09:00 oliverschmidt Exp $
*/
#include "contiki.h"
@ -50,7 +50,7 @@
#define PORT 6667
#define SEND_STRING(s, str) PSOCK_SEND(s, str, (unsigned int)strlen(str))
#define SEND_STRING(s, str) PSOCK_SEND(s, (uint8_t *)str, (unsigned int)strlen(str))
#define ISO_space 0x20
#define ISO_bang 0x21
@ -412,7 +412,7 @@ PT_THREAD(handle_connection(struct ircc_state *s))
{
PT_BEGIN(&s->pt);
PSOCK_INIT(&s->s, s->inputbuf, sizeof(s->inputbuf) - 1);
PSOCK_INIT(&s->s, (uint8_t *)s->inputbuf, sizeof(s->inputbuf) - 1);
PT_WAIT_THREAD(&s->pt, setup_connection(s));