This documentation is not maintained. Please refer to doc.castsoftware.com/technologies to find the latest updates.
This page presents the different messages that are produced by the C and Cpp Analyzer during application source code analysis. Messages are presented with their identifier (referenced in the analysis log files), a description, and a possible remediation. 

Issue #1: Analysis stops prematurely while executing a C/C++ analysis

During an analysis errors can occur that stop the analysis process. In the table below you will find the list of error messages that are related to this and the steps to follow in order to resolve the problem:

Message

Description

Message Level

Impact

Resolution

Analysis canceled on user request.

The analysis has been canceled by the user.

Error

The analysis ended.

Restart the analysis.

Run-time exception occurred, analysis canceled: <Reasons>

The analysis crashed.

Error

The analysis ended without any result.

Contact Support.

Please take a copy of the file 'PATH' and send it to CAST, to help analyze the issue.

This message is associated with the analysis crash above. Please send support the preprocessed file mentioned in the error message.

Error

The analysis ended without any result.

Contact Support and send them the preprocessed file.

Unknown exception occurred, analysis canceled.

The analysis crashed.

Error

The analysis ended without any result.

Contact Support.

Fatal error: <Reason>

The analysis crashed.

Error

The analysis ended without any result.

Contact Support.

Analysis canceled.

The analysis has been canceled.

Error

The analysis ended without any result.

Restart the analysis. If you face the problem again, then contact Support.

Invalid positions (start, end) found for object NAME when computing CRC: <list of positions>

Internal error.

Error

The result of the analysis will be corrupt.

Contact Support and send them the preprocessed file.

Parser error <Details>

Parsing error.

Error

The result of the analysis can be corrupt.

Contact Support and send them the preprocessed file.

Some unexisting paths where found in the configuration: <path>This error will occur when you have manually added Source code, Includes or Macros to the analysis configuration and these items point to a code location that either no longer exists or cannot be accessed when the analysis is run. Typically this occurs when analyzing Vn+1 of the Application and the Deployment folder changes location between versions: if the Source code, Includes or Macros point to the previous Deployment folder, then the error occurs.ErrorThe analysis ended without any result.Update and correct the location of the manually added Source code, Includes and Macros and then re-run the analysis.

Issue #2: Missing source code

Situation is clear: either you don't have the complete source code or there is a mismatch between the Operating System you have configured the Analysis Unit for and the system headers you are using.

Please find below the error messages concerning these issues:

Message

Description

Message Level

Impact

Resolution

"Invalid include path <path>, declared in environment profile 'PROFILE'

The path of the included file is not correct. Please correct it.

Error

The results of the analysis may be corrupt.

Correct the definition of the profile or select another profile.

Configuration <Message> (during the phase of parsing)

A macro or an include file it is not correctly defined. Probably an include file is missing.

Error

The results of the analysis will be corrupt.

Correct the configuration or define the missing macro.

Issue #3: Configuration problems

Sometimes the whole source code is available but issues related to the configuration can occur.  Fortunately these issues are highlighted by error messages (see the table below) giving you the possibility to correct them and improve the quality of the results.

Message

Description

Message Level

Impact

Resolution

Unable to open file <name of the file>.

Unable to open the file.

Error

The result of the analysis will be corrupt.

Check that file is accessible (network, permissions etc.) or call Support.

"Unable to open file 'PATH' and to compute CRC. Reason: <reason>

Unable to open the file.

Error

The result of the analysis will be corrupt.

Check that file is accessible (network, permissions etc.) or call Support.

Preprocessor cannot find file <name of the file>

An included file is missing.

Warning

The result of the analysis may be corrupt.

Add the file or correct the include path.

Following file(s) is/are selected for analysis, while being also included by other analyzed file(s). This could lead so some inconsistencies in the analysis, if they are parsed with different preprocessing contexts (e.g. different macro definitions).
Maybe you want to consider removing that/these file(s) from the selection: POSLIST

Following file(s) is/are selected for analysis, while also being included by other analyzed file(s).

Warning

The result of the analysis may be corrupt.

Correct the analysis configuration.

Trying to include a precompiled header from another place than the start of the compiled file (file '<path>', line <line>). This can cause strange behavior. PCH usage deactivatedThis usually occurs when a file that is included, itself includes a .pch. This usually would happen in files such as .hpp or .c files.
What customer can do: Not include pch from file that is included.
WarningNo impact.Avoid including .pch in the source code where possible.

Issue #4: There are some ambiguities with regard to object names

Issues can occur at analysis time with regard to object names. This probably means that:

  • Either you have issues in the macro on portable code (i.e code meant for multiple Operating Systems): some functions are defined several times (one for each Operating System) and the macros prevent the analyzer from only considering one of them. To see this, you should use the Test Analysis action - have a look at the locations where the functions are defined and see under which preprocessor conditions they should be compiled.
  • Or (less probable) you have some code that relies on some specific properties of the compiler (which is indeed bad practice).

Below are the main messages related to these issues with the impact and the resolution steps:

Message

Description

Message Level

Impact

Resolution

Empty variable name encountered (is that a C++ file?)

Error concerning the empty variable names, most probably due to an earlier parsing error .

Warning

The result of the analysis will be corrupt.

Correct the analysis configuration.

Multiple definitions found for 'NAME'. A link will be traced towards each of these definitions: <list of positions>

Resolution error.

Warning

Unwanted links can be created.

Contact Support.

Several definitions found for symbol <symbol mangling>:<list of positions>
References to that symbol will be duplicated in some cases.

Multiple definitions found for the same object inside different source code.

Warning

The analysis will contain unwanted links.

Split the Analysis Unit into several parts.

Several definitions found for <name of object>. Two objects will be created: <list of positions>

Multiple definitions found for the same object inside the same source code.

Warning

The analysis will contain unwanted links.

Split the Analysis Unit into several parts.

Unresolved identifier <name of identifier>

Resolution error. Some source code may be missing.

Warning

Some missing links.

Correct the analysis configuration or contact Support.

Function <name of the function>() is called without having been declared.

This message concerns only the C language. An include file is missing or the file uses C feature unrecommended.

Warning

There is no impact.

Check the analysis configuration.

No parent class nor namespace found for method/function <name of the method>. Object will be saved under its parent file only.

The source code is not complete. Most of the time headers with class definitions are missing.

Warning

The result of the analysis may be corrupt.

Correct the analysis configuration (the include paths).

Unknown identifier <name of the identifier> is now considered as a type.

The parser has corrected a missing macro definition or a missing include file. Please complete the macro definition list in order to remove the warning.

Warning

No impact.

Correct the analysis configuration.

Issue #5: Memory problems

If you are experiencing memory issues during an analysis, Cast recommends using the Windows perfmon tool while running the analysis to check if the process is using more than 1.9 GB of memory.

If this is the case, it means that the Analysis Unit is too big in terms of file size or file number - you will need to split the Analysis Unit into multiple smaller Analysis Units.

Note that the CAST Management Studio automatically manages dependencies between Analysis Units provided that the Analysis Units are all part of the same parent application.
Please also check that all include files are available if needed in all the new Analysis Unit configurations.

Issue #6: Other problems

If you are still experiencing problems and none of them concern the topics above, then please check the messages below:

Message

Description

Message Level

Impact

Resolution

Unable to access list of system functions implied in diags (strcpy, gets...). Some of these diags could be inconsistent.

The analyzer cannot access the list of system functions.

Error

The result of the analysis will be corrupt.

Contact Support.

Flag 'recursive' has been set for include path 'PATH'. This flag is generally useless and this is generally an error to set it.

The order defined for the included files is not correct.

Warning

The result of the analysis will be corrupt.

Remove the "recursive" flag.

File <name of the file> has no executable code.

The files only contain function definitions, macros or comments.

Warning

The result of the analysis may be corrupt.

Check the analysis configuration.

"[Parser] XXX: Single operand or parenthesized expression expected."

"[Parser] XXX:  Nonstandard untyped declaration, "int" assumed."

"[Parser] XXX: Ignored token 'XXX'"

"[Parser] XXX: Variable has already a name"
Generally these type of messages are not blocking and usually mean that a defined macro or a header file is missing.WarningPotentially missing links.Check the analysis configuration and the delivered source code.