Imagix 4D User Guide


Source Checks

The Source Checks are a series of reports, one for each of the file-based source checks listed and described below. These source checks point out exceptions to generally agreed upon design and coding practices. Each report provides a listing of all the exceptions to a particular source check, across all the files in the project.

Alternatively, you can view all of the exceptions to all of the source checks, for one specific file. To invoke this file-specific source checks report, use the context sensitive menu by right clicking on a file symbol, or use the File > Reports menu in a File Editor.

While in the File Editor, you can also view the specific areas in the source code where exceptions occur. These are indicated by underlining, which you enable or disable for specific source checks through the the general Options dialog (Files > Options > File Editors > Source Check Display). To learn what particular source check exception is being indicated by a specific underline, use the Information overlay.

File-Based Source Checks

Built-In OperatorsIndicates that the number of built-in operators in an expression exceeds a user-specified threshold.
Conversion IssueFlags a conversion which could lose precision or rely on non-portable interpretations of arithmetic or pointers. This includes mixing of signed and unsigned operands when it can lead to portability problems. Also includes right-shifts of signed operands. (EX: int x; unsigned y; x = y;)
Functions in ExpressionIndicates that the number of function calls in an expression exceeds a user-specified threshold.
Jump StatementFlags a goto, break or continue statement which makes control flow more difficult to understand.
K&R Style DeclaratorFlags a function declarator that uses old style K&R syntax, which is not valid in C++.
Missing Default CaseFlags a switch statement which does not have a default case.
Missing/Mismatched DeclIndicates an inconsistency between the declaration of a function and the parameters used in a function call. This is mostly effective for C, where prototypes are missing or inconsistent.
Missing Return TypeFlags a function declaration which does not specify the return type.
Needs Compound StatementFlags a potentially missing compound statement (braces). This includes possible errors caused by a dangling else or by a statement mistakenly disassociated from a while or for.
No ConstructorIndicates that a class does not have a constructor. Best practices recommend that explicit constructors always be defined in order to avoid problems in initializing the class objects.
Omitted LinesFlags a source line which is ignored by the analyzer due to the current preprocessor settings.
Old Style AllocatorFlags the use of old style memory allocators, such as malloc, realloc, calloc or free, in a C++ program.
Potential Static FunctionIndicates that a function is only called from within the file where it is defined, but is not declared static.
Problematic ConstructorFlags a problematic definition in a class constructor. This includes virtual function calls from the constructor and initialization order problems.
Return IgnoredFlags a statement which ignores the result of either a function call or any other expression where the computation is not stored. This typically indicates that error results are being ignored.
Skipped LinesFlags a source line which is skipped due to syntax problems that the analyzer cannot resolve. If the source compiles in the original development environment, this could be an indication of missing include files or incorrect configuration of the analyzer.
Suspicious AssignmentFlags a suspicious assignment in a conditional expression or argument list, where the assignment might actually be intended as a comparison.
Unclear SubexpressionFlags a subexpression which is potentially not written as intended. This includes comparisons that can be statically evaluated like unsigned variables and negative numbers. Catches typical suspicious relational operator uses and potential lack of parenthesis. (EX: x && y | z).
Unused Global VariableIndicates that a global variable is never used in the source files loaded into the project.
Unused Local VariableIndicates that a local variable is never used.
Unused Static VariableIndicates that a static variable is never used.
Unterminated CaseFlags a case in a switch statement which is not terminated by an explicit transfer of control, such as a break statement.
Variable Number of ArgsFlags a function which has a variable number of arguments.