Opened 5 years ago

#1839 new task

Cppcheck a static analysis tool for C/C++ code

Reported by: riza Owned by: bennylp
Priority: normal Milestone: Known-Issues-and-Ideas
Component: common Version: trunk
Keywords: Cc:
Backport to 1.x milestone: Backported: no

Description

Cppcheck is a static analysis tool for C/C++ code. Unlike C/C++ compilers and many other analysis tools it does not detect syntax errors in the code. Cppcheck primarily detects the types of bugs that the compilers normally do not detect.

The test shows some non reentrant APIs used in pjsip.

  • strtok
  • gethostbyname
  • localtime

These API have a reentrant version, usually with a suffix "_r" (e.g: strtok_r) and should already be included in the standard (2001).
However, those version may not be portable, as on Windows they provide a "_s" (e.g: strtok_s) counterpart.

Other test results are self explanatory, and can be found on the attachment.

Attachments (1)

cppcheck_result.txt (106.7 KB) - added by riza 5 years ago.
Cppcheck test result

Download all attachments as: .zip

Change History (1)

Changed 5 years ago by riza

Cppcheck test result

Note: See TracTickets for help on using tickets.