warning: passing argument ’from incompatible pointer type [enabled by default]’

l=FFT(logN,&werte,&nul);
           ^      ^

Drop ampersands from that line.


The problem is that the & operator in this context produces an expression with a different type than what FFT expects. FFT expects a pointer to a double and &werte produces a pointer to an array of N elements. So, in order to make FFT happy, just pass werte which will quietly decay to a pointer to the first element.

For more information on pointers to arrays, there’s a C FAQ.

Leave a Comment