Error occurs because we have mixed the ANSI prototype with K & R style of function definition.
When we use ANSI prototype for a function and pass a float to the function it is promoted to a double. When the function accepts this double into a float a type mismatch occurs hence the error.
The remedy for this error could be to define the function as :
int fun (float aa)