Removed compiler warnings.

This commit is contained in:
oliverschmidt 2007-11-18 01:36:59 +00:00
parent de7b87868d
commit d609db3580
3 changed files with 7 additions and 21 deletions

View file

@ -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

View file

@ -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

View file

@ -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))