Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Info
titleGenerated Content

This page is automatically generated from the "Automated Detection" sections in the individual guidelines. Do not modify this page directly.

Version number:
5.0 

Checker

Guideline

MSC50-CPP. Do not use std::rand() for generating pseudorandom numbers
CTR01-CPP. Do not apply the sizeof operator to a pointer when taking the size of an array
DCL01-CPP. Do not reuse variable names in subscopes
DCL04-CPP. Do not declare more than one variable per declaration
DCL06-CPP. Use meaningful symbolic constants to represent literal values in program logic
EXP00-CPP. Use parentheses for precedence of operation
EXP19-CPP. Do not perform assignments in conditional expressions
INT07-CPP. Use only explicitly signed or unsigned char type for numeric values
INT09-CPP. Ensure enumeration constants map to unique values
INT13-CPP. Use bitwise operators only on unsigned operands
MEM02-CPP. Immediately cast the result of a memory allocation function call into a pointer to the allocated type
MSC04-CPP. Use comments consistently and in a readable fashion
MSC12-CPP. Detect and remove code that has no effect
PRE00-CPP. Avoid defining macros
PRE01-CPP. Use parentheses within macros around parameter names
PRE02-CPP. Macro replacement lists should be parenthesized
PRE03-CPP. Prefer typedefs to defines for encoding types
PRE04-CPP. Do not reuse a standard header file name
PRE06-CPP. Enclose header files in an inclusion guard
PRE07-CPP. Avoid using repeated question marks

C++ checkers

Rule

134 S

EXP50-CPP. Do not depend on the order of evaluation for side effects
1 QEXP50-CPP. Do not depend on the order of evaluation for side effects
35 D 134 SEXP50-CPP. Do not depend on the order of evaluation for side effects
42 35 DEXP54EXP50-CPP. Do not access an object outside of its lifetimedepend on the order of evaluation for side effects
51 DMEM50-CPP. Do not access freed memory

71 S

EXP54-CPP. Do not access an object outside of its lifetime
75 DFIO21-CPP. Do not simultaneously open the same file multiple times

84 D

FIO50-CPP. Do not alternately input and output from a file stream without an intervening positioning call

86 D

VOID FIO30-CPP. Exclude user input from format strings

9 SEXP50-CPP. Do not depend on the order of evaluation for side effects

 

:rand() for generating pseudorandom numbers

>