I am trying to build a block where I am getting this error message
pprbc_CONTENT_icverification_act.c", line 99.2: 1506-018 (S) Operand of indirection operator must be a pointer expression
Can anyone please explain what this means?
code below:
*(WORK_migration_ind_f) =
*(migration_status_in_MI9_CIRCLE_INFO(WORK_source_circle_f));
Yes, you put a '*' in front of something that isn't a pointer.
You'd be doing yourself and everybody a favor if you posted the line of code involved.
Presumably you have code something like this:
int x;
*x; // apply indirection to non-poiner
But it's impossible to say without seeing the actual code that causes the error message.
The *
(indirection) operator dereferences a pointer; that is, it converts a pointer value to an l-value. The operand of the indirection operator must be a pointer to a type.
Either the variable WORK_migration_ind_f
or the return type of the function migration_status_in_MI9_CIRCLE_INFO
(or both) is not a pointer type. You can dereference only a pointer.
If you have code like:
int *pi;
int i;
int f(void);
int *pf(void);
Then, the following "makes sense":
*pi /* is of type int */
*pf() /* is of type int */
The following doesn't:
*i /* can't dereference a non-pointer */
*f() /* can't dereference a non-pointer */
If you show us the declarations of WORK_migration_ind_f
and WORK_migration_ind_f
, we can tell you more, but I think you should be able to figure the error out on your own now.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.