[asterisk-dev] Code Coverage?

Alexander Traud pabstraud at compuserve.com
Mon Nov 29 03:51:36 CST 2021


When going for a new version of the compiler (GCC and Clang) or Doxygen, 
those tools, again and again, improve their syntax checker and create 
warnings for common issues. Avoiding such warnings is quite handy 
because they can reveal actual bugs.

In Asterisk, some parts of the code are not covered, compiled, or 
inspected on default. The reasons for this are missing external libs 
like PRI/SS7, #ifdefs with certain versions/features of a library like 
SRTP, not enabled on default in menuselect, or alternatives like ODBC 
with the voicemail app.

Long story short: Is there any trick to go through all code of Asterisk? 
Yes, I have to go for several runs to cover everything because of 
alternatives. However, is there a list or trick to cover those #ifdefs?

Besides revealing bugs early, such a list would prevent dead code like 
<http://lists.digium.com/pipermail/asterisk-dev/2018-June/076899.html>





More information about the asterisk-dev mailing list