Help to resolve some problem

OP #1173511
Rate this post
useful
not useful
Hi all again.
I use pointer with structure and compiler show problem:
cnc1.c:76: warning: passing argument 4 of 'StartMove' discards
qualifiers from pointer target type

Program work but how can I resolve this warning???

I like if compiler donw't show any warning or error.

regards
#1173512
Rate this post
useful
not useful
I think it has something to do with const qualifier.
you can try casting the said argument...or...

you could post the code for other's to see. :)


Sevc Dominik wrote:
> Hi all again.
> I use pointer with structure and compiler show problem:
> cnc1.c:76: warning: passing argument 4 of 'StartMove' discards
> qualifiers from pointer target type
>
> Program work but how can I resolve this warning???
>
> I like if compiler donw't show any warning or error.
>
> regards
OP #1173513
Rate this post
useful
not useful
in file axes.h is:
typedef struct {
    float  Vactual;
    float  Vmax;
    float  Vneed;
    float  Vstart;
    float  Amax;
               }  Ax_parameter;

extern volatile Ax_parameter Ax_p_x;
extern void MoveAx(Ax_parameter *Ax_par, BYTE Ax);

in axes.c is :

volatile Ax_parameter Ax_p_x = {0,0,0,0,0};

in main.c is:
MoveAx(&Ax_p_x,0);
on this line compiler show warning .
any sugestion????

regards
#1173514
Rate this post
useful
not useful
> MoveAx(&Ax_p_x,0);
> on this line compiler show warning .

the above line doesn't match the warning you get

>warning: passing argument 4 of 'StartMove' discards

I'm positive that the warning you get is in the line
that says something "like"...

StartMove(arg1,arg2,arg3,arg4,arg...);



..just trying to help :)

Reply

Please log in before posting.

or

Log in with Google account

Registration is free and takes only a minute.

Register now