Programming error detection

Objective

Research of possible programming errors in source files.

Justification

Some uses of the specificities of a language can lead to the introduction of bugs in the code (during the development or the maintenance phase). Their early localization allows to avoid many potential defects and to spare time during the validation and software exploitation phases.

Languages

C, C++ …

Controls

Search for the following defects:
•    Instructions without effect
•    Unreachable code
•    Empty bloc in a test
•   « break » missing in a « switch » branch
•   « default » missing in a « switch »
•    Use of the return of a procedure
•    Confusion between assignment and test
•    Comparisons of real numbers for equality or difference

Tool used

IBM Rational Logiscope RuleChecker

Material

Report identifying all dangerous construction uses in the code.