polyspace: best practice for stubbing functions that exit?
이전 댓글 표시
I'm not sure what the best practice is with respect to stubbing functions that exit/terminate the program. Consider a reboot() function rebooting the system. I can stub it as
void reboot(void)
{
for (;;) {
;
}
}
But that makes "for" a red NTC which I can't seem to make go away with "-known-NTC reboot". So I went with
#include <stdlib.h>
void reboot(void)
{
exit(0);
}
This makes "exit" a dashed red underline, with a bubble comment saying "A problem occurs during the execution of call to function __polyspace__stdstubs.exit.".
How do I stub such a function without getting a red or other problematic statement?
채택된 답변
추가 답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 Get Started with Polyspace Products for Ada에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!