S
sieg1974
Hi,
When I try to compile the following program, the compiler tells that
initializer is not a constant in line 14. What's wrong with this code?
Thanks,
Andre
#include <stdio.h>
#define UINT16 unsigned short int
#define ALIGN4( x ) ( ((x)+3) & (~3))
#define TFO_MAX_AMR_PAYLOAD_SIZE 32
UINT16 HSF_PKT_TOTALSIZE(UINT16 payloadLength)
{
return ((UINT16)(400));
}
const int TFO_INGR_SCRATCH_SIZE =
ALIGN4(HSF_PKT_TOTALSIZE(TFO_MAX_AMR_PAYLOAD_SIZE));
void main()
{
printf( "%d\n", TFO_INGR_SCRATCH_SIZE );
}
When I try to compile the following program, the compiler tells that
initializer is not a constant in line 14. What's wrong with this code?
Thanks,
Andre
#include <stdio.h>
#define UINT16 unsigned short int
#define ALIGN4( x ) ( ((x)+3) & (~3))
#define TFO_MAX_AMR_PAYLOAD_SIZE 32
UINT16 HSF_PKT_TOTALSIZE(UINT16 payloadLength)
{
return ((UINT16)(400));
}
const int TFO_INGR_SCRATCH_SIZE =
ALIGN4(HSF_PKT_TOTALSIZE(TFO_MAX_AMR_PAYLOAD_SIZE));
void main()
{
printf( "%d\n", TFO_INGR_SCRATCH_SIZE );
}