How to resolve a incompatibility between pointers "far float*" and "float *"?

I’m using a pointer as an argument of the type float* in a subfunction of the program. The thing is, I’m allocating an space for the pointer with the malloc command, but it’s syntax accepts just a pointer declared as “static far float * far ptr”. When I compile the program, I face the warning message below:

[i]line 319 : WARNING PROC_ONDAS_2.C : Wrong type for parameter 1.

line 319 : WARNING PROC_ONDAS_2.C : Converting far float * to incompatible pointer type float *[/i]

So, I don’t know the right syntax to use or if this warning message means that the subfunction won’t work. I’ve tried to declare the function with a far type pointer argument, like “float max (float * far temp, int N)”, but it won’t accept it. And if I change the declaration of the pointer from far float* to float*, i experiment imcompatibility problems with the malloc function.

Could someone help me? I’d already searched in the manual, but I didn’t find anything.

Thank you,

Francisco.

Have you tried:
float max(float far * temp, int N)

1 Like

Hello petermcs!

Thank you for your answer, it worked.