Non-initialized variable in __polyspace_main.c
조회 수: 27 (최근 30일)
이전 댓글 표시
If I enable the option "Ignore default initialization of global variables", I get orange alarms on the Macro PST_TRUE() in the __polyspace_main.c, which is the volatile variable pst_random_int. I want the Code Prover to detect not-initialized variables in my code, but not to use non-initialized in the automatically generated main. My expectation is that polyspace handles the self-generated global variables for itself and only report errors on code like this:
uint8 myGlobalVariable;
void main()
{
uint8 a;
a = myGlobalVariable;
}
What have I to adjust to get the behavior described above? And why does I get alarms on the generated Polyspace files at all?
댓글 수: 0
답변 (1개)
Lucas Lebert
2017년 12월 12일
Hi, Patricia! Unfortunately, there's no workaround for this NIV orange check prior to R2017a. Starting in R2017a, the global variable in the generated main should no longer be raised. If the issue still persists in more recent releases, feel free to contact the MathWorks technical support. Have a great day, Lucas
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Run Settings에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!