[previous] 0318 [next] Redundant type qualifier used in cast
Redundancy REFERENCE - ISO:C90-6.3.4 Cast Operators - Semantics

This message is issued whenever a type qualifier is specified at the top level of a cast. This is meaningless since the result of a cast expression is an rvalue.

For example:


/*PRQA S 1-9999 ++*/
/*PRQA S 0318 --*/

unsigned uia;

void f0318 (void)
{
  (int *)          uia;
  (int const *)    uia;
  (volatile int *) uia;

  (int volatile)   uia;     /* 0318 */
  (const int)      uia;     /* 0318 */
  (int * const)    uia;     /* 0318 */
}

QA·C Source Code Analyser 8.1.2
© 2013 Programming Research.
www.programmingresearch.com
Personality Groups | Glossary | Message Index Contents