A pointer should point to a const-qualified type whenever possible
A pointer should point to a const-qualified type whenever possible.
This rule ensures that you do not inadvertently use pointers to modify objects.
The rule checker flags a pointer to a non-const function parameter if the
pointer does not modify the addressed object. The assumption is that the pointer is
not meant to modify the object and so must point to a
const-qualified type.
If you expect a rule violation but do not see it, refer to the documentation of Polyspace® Code Prover™ or Polyspace Code Prover Server™.
| Group: Declarations and Definitions |
| Category: Advisory |
| AGC Category: Advisory |