Fixed sdcc compiler problem: function pointers cannot be NULL, so added a dummy function instead

This commit is contained in:
adamdunkels 2009-09-09 21:09:42 +00:00
parent 2181e90f69
commit 786ed3cf84
2 changed files with 16 additions and 4 deletions

View file

@ -28,7 +28,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* $Id: chameleon-bitopt.c,v 1.7 2009/03/12 21:58:20 adamdunkels Exp $ * $Id: chameleon-bitopt.c,v 1.8 2009/09/09 21:09:42 adamdunkels Exp $
*/ */
/** /**
@ -331,12 +331,18 @@ unpack_header(void)
bitptr += len; bitptr += len;
} }
return c; return c;
}
/*---------------------------------------------------------------------------*/
static void
init(void)
{
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
CC_CONST_FUNCTION struct chameleon_module chameleon_bitopt = { CC_CONST_FUNCTION struct chameleon_module chameleon_bitopt = {
unpack_header, unpack_header,
pack_header, pack_header,
header_size, header_size,
NULL init
}; };
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/

View file

@ -28,7 +28,7 @@
* *
* This file is part of the Contiki operating system. * This file is part of the Contiki operating system.
* *
* $Id: chameleon-raw.c,v 1.6 2009/03/12 21:58:20 adamdunkels Exp $ * $Id: chameleon-raw.c,v 1.7 2009/09/09 21:09:42 adamdunkels Exp $
*/ */
/** /**
@ -180,7 +180,13 @@ hdrsize(const struct packetbuf_attrlist *a)
size += len; size += len;
} }
return size / 8; return size / 8;
}
/*---------------------------------------------------------------------------*/
static void
init(void)
{
} }
/*---------------------------------------------------------------------------*/ /*---------------------------------------------------------------------------*/
CC_CONST_FUNCTION struct chameleon_module chameleon_raw = { input, output, CC_CONST_FUNCTION struct chameleon_module chameleon_raw = { input, output,
hdrsize, NULL }; hdrsize, init };