I am currently using ccc-analyzer by means of static-build to analyze our code base. I am using a recent build I made from the Git mirror.

Now in PC-Lint I am able to tell Lint whenever a function doesn't return. This is usually done via /*lint -unreachable*/ or similar comments ("markup") that control the PC-Lint behavior.

With scan-build I am now running across a number of false positives that I would like to suppress, because I know that a particular function will never return (ultimately it calls the exit function of the C runtime). Is there any way to tell static-build/ccc-analyzer that my function cannot return?

有帮助吗?

解决方案

Turns out there is a way to annotate the code using GCC-style attributes as documented here. So the question is answered.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top