내가 (최소한 문제를 보여주기 위해 감소) 다음 줄이 :초기화 문자 배열과 MISRA 오류
Error[Pm023]: missing elements - braces shall be used to indicate and match the structure in the non-zero initialization of arrays and structures (MISRA C 2004 rule 9.2).
왜이 오류가 :
char version_text[64U] = {'\0'};
이 줄은 다음과 MISRA 오류가 발생을?
나의 현재 해결 방법은 다음과 같습니다 char
유형 내 컴파일러 (IAR EW)에 의해 signed char
로 구현되어 있음을 나타냅니다
char version_text[64U] = {0};
.
'\ 0'은 문자 리터럴이므로 char
과 일치해야합니다.
이 경우 또는 준수하는'' "'. – Lundin