에러명 : case label does not reduce to an integer constant
에러 위치
void analysis_si2cmfc(U8 *p_imsg_data)
{
switch(*(p_imsg_data + OFF_FUNCTIONX))
{
case GET_AT_IDX('E'):
case 부분에서 에러가 뜹니다.
C 에서는 case 에 인티저값만 된다는 걸 알고있습니다. C++ 은 다른것도 된다는 말을 본거 같기는 한데..
아무튼 나머지 코드는 아래와 같습니다.
int htAlarmtype[7] = {-1,-1,3/*O*/,-1,4/*C*/,2/*R*/,1/*E*/};
#define GET_AT_IDX(x) (htAlarmtype[x%7])