Undefined Functions, most recent analyses
Warning: JavaScript disabled -- Please re-enable to ensure correct hub functionality.
Problem: CodeSonar's build phase did not encounter definitions (i.e., function bodies in parsed source files) for some functions that are called in the project.
For many projects it is normal and acceptable to have some undefined functions. You do not need to resolve this alert if you are content to have the undefined functions and their effects omitted from the analysis. However, we strongly recommend resolving undefined function alerts for the following kinds of functions:
- Allocators and deallocators, such as malloc() and free().
- Functions that never return, such as abort() and __assert_fail().
- Any functions that are called very frequently in the project.
Consequences: CodeSonar will be unable to detect problems that are caused or influenced by those functions. CodeSonar may also detect false positives that could be avoided with a deeper understanding of these functions.
Resolution: The resolution will depend on the reason that CodeSonar could not find the function definitions.
-
Functions are defined in a library that is not built from source.
Action: If the library source code is available, you may wish to compile it during the build process. If source code is not available, or it is available but you don't want to compile it, author a library model.
-
Functions are defined in the project, but were not built
during the CodeSonar build/analysis.
(If you built the CodeSonar project from the command line, see the analysis build logs for output from the software build command that CodeSonar observed.)Action: This usually means that your build directory contains files from a previous software build that was not analyzed with CodeSonar. Clean your build directory, delete the .prj_files directory, and re-run the CodeSonar build/analysis.
For CodeSonar results to accurately reflect the changes in a given build directory, the CodeSonar analysis must be applied to every build that takes place there.
-
Functions are defined and were built, but CodeSonar did not
parse them
(For a list of files parsed by CodeSonar see the analysis parse logs.)Action: This usually means that CodeSonar is not configured to recognize the compiler being used. Edit the general project configuration file to include appropriate values for the COMPILER_MODELS parameter. See Compiler Models for more information
Undefined Functions: