Home/Support/Support Forum/How to resolve a incompatibility between pointers "far float*" and "float *"?
Welcome to Digi Forum, where you can ask questions and receive answers from other members of the community.

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

0 votes
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:

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 *


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.
asked Jun 14, 2013 in Rabbit by fpborges New to the Community (2 points)

Please log in or register to answer this question.

1 Answer

+1 vote
 
Best answer
Have you tried:
float max(float far * temp, int N)
answered Jun 16, 2013 by petermcs Veteran of the Digi Community (1,130 points)
selected Jun 17, 2013 by rmaroun
Hello petermcs!

Thank you for your answer, it worked.
...