From d609db3580b4b542db7973052eabad7c180a3950 Mon Sep 17 00:00:00 2001 From: oliverschmidt Date: Sun, 18 Nov 2007 01:36:59 +0000 Subject: [PATCH] Removed compiler warnings. --- apps/webbrowser/webclient.c | 11 +++++------ core/sys/cc.h | 13 +------------ cpu/z80/z80def.h | 4 +--- 3 files changed, 7 insertions(+), 21 deletions(-) diff --git a/apps/webbrowser/webclient.c b/apps/webbrowser/webclient.c index 52606f9bc..3ad5eeca1 100644 --- a/apps/webbrowser/webclient.c +++ b/apps/webbrowser/webclient.c @@ -29,7 +29,7 @@ * * This file is part of the "contiki" web browser. * - * $Id: webclient.c,v 1.3 2007/08/30 14:39:18 matsutsuka Exp $ + * $Id: webclient.c,v 1.4 2007/11/18 01:36:59 oliverschmidt Exp $ * */ @@ -160,9 +160,8 @@ webclient_get(char *host, u16_t port, char *file) return 1; } /*-----------------------------------------------------------------------------------*/ -static unsigned char * CC_FASTCALL -copy_string(unsigned char *dest, - const unsigned char *src, unsigned char len) +static char * CC_FASTCALL +copy_string(char *dest, const char *src, unsigned char len) { return strcpy(dest, src) + len; } @@ -219,7 +218,7 @@ parse_statusline(u16_t len) while(len > 0 && s.httpheaderlineptr < sizeof(s.httpheaderline)) { s.httpheaderline[s.httpheaderlineptr] = *(char *)uip_appdata; - CC_INC_CAST_POINTER(char *, uip_appdata); + uip_appdata = (char *)uip_appdata + 1; --len; if(s.httpheaderline[s.httpheaderlineptr] == ISO_nl) { @@ -287,7 +286,7 @@ parse_headers(u16_t len) while(len > 0 && s.httpheaderlineptr < sizeof(s.httpheaderline)) { s.httpheaderline[s.httpheaderlineptr] = *(char *)uip_appdata; - CC_INC_CAST_POINTER(char *, uip_appdata); + uip_appdata = (char *)uip_appdata + 1; --len; if(s.httpheaderline[s.httpheaderlineptr] == ISO_nl) { /* We have an entire HTTP header line in s.httpheaderline, so diff --git a/core/sys/cc.h b/core/sys/cc.h index 47f5f77ee..c35bdad3f 100644 --- a/core/sys/cc.h +++ b/core/sys/cc.h @@ -39,7 +39,7 @@ * * This file is part of the Contiki desktop OS * - * $Id: cc.h,v 1.3 2007/09/01 00:49:41 matsutsuka Exp $ + * $Id: cc.h,v 1.4 2007/11/18 01:37:48 oliverschmidt Exp $ * */ #ifndef __CC_H__ @@ -110,17 +110,6 @@ #define CC_ASSIGN_AGGREGATE(dest, src) *dest = *src #endif /* CC_CONF_ASSIGN_AGGREGATE */ -/** - * Configure if the C compiler supports the increment of pointer. - */ -#ifdef CC_CONF_INC_CAST_POINTER -#define CC_INC_CAST_POINTER(type, data) \ - CC_CONF_INC_CAST_POINTER(type, data) -#else /* CC_CONF_INC_CAST_POINTER */ -#define CC_INC_CAST_POINTER(type, data) \ - ++((type) data) -#endif /* CC_CONF_INC_CAST_POINTER */ - #if CC_CONF_NO_VA_ARGS #define CC_NO_VA_ARGS CC_CONF_VA_ARGS #endif diff --git a/cpu/z80/z80def.h b/cpu/z80/z80def.h index bd31addaf..3f9db7770 100644 --- a/cpu/z80/z80def.h +++ b/cpu/z80/z80def.h @@ -27,7 +27,7 @@ * NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: z80def.h,v 1.2 2007/09/19 12:44:01 matsutsuka Exp $ + * $Id: z80def.h,v 1.3 2007/11/18 01:38:05 oliverschmidt Exp $ * */ @@ -77,8 +77,6 @@ typedef unsigned int size_t; #define CC_CONF_ASSIGN_AGGREGATE(dest, src) \ memcpy(dest, src, sizeof(*dest)) -#define CC_CONF_INC_CAST_POINTER(type, data) \ - data = ((type)data) + 1 #define uip_ipaddr_copy(dest, src) \ memcpy(dest, src, sizeof(*dest))