[previous] 0437 [next] [C] Left operand of '->' must be a pointer to a 'struct' or 'union' object.
Constraint violations REFERENCE - ISO:C90-6.3.2.3 Structure and union members

This is a constraint error

The identifier on the left-hand-side of the '->' operator is not a pointer to a 'struct' or 'union' type.

Check that you have spelt the name of the 'struct'/'union' pointer correctly and that you did really mean to use the '->' operator. For example:


/*PRQA S 506,2213,2216,3120,3199,3203,3408,3447 ++*/

struct ST {int width; int range;};

extern struct ST * value;

void foo(void)
{
   valua->range = 5;        /* Message 0437 and also 0434 - 'valua' is a misspelling */

   value->range = 5;        /* OK - correct spelling */
}

See also:

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