Page 1 of 1

call to buffer has incorrect number of arguments

Posted: Fri Oct 20, 2017 2:25 pm
by osch
Hello! I started getting this error when i build my project and i cannot figure out why. Does anyone know where im supposed to look in my code for this? I cant figure out what i did. The project has multiple modules and files and i suspect one of the modules is broken, but i cannot figure out which one.

xmake CONFIG=Default all
Checking build modules
Propagating analysis
....../main.xc: warning: call to buffer has incorrect number of arguments
xmake[1]: *** [.build/pca.xml] Error 255
xmake: *** [analyze] Error 2

Re: call to buffer has incorrect number of arguments

Posted: Sat Oct 21, 2017 3:46 pm
by Gothmag
I'd start in main.xc and go from there. Any headers directly included there as well.

Re: call to buffer has incorrect number of arguments

Posted: Mon Oct 23, 2017 8:33 am
by osch
Okay so i figured out what caused this issue and im hoping this might help others in the future. I had copied a function from a post on this forum which name was buffer:

void buffer(server interface var_shared_if i_shared[2]){

This caused this compiler error and made xpca.exe stopped working. I have changed the name of the function and it works just fine now.

Re: call to buffer has incorrect number of arguments

Posted: Mon Oct 23, 2017 12:20 pm
by robertxmos
It sounds like the dependencies and their timestamps got out of sync.
One of the files had changed, but the artifacts were not being rebuilt.
The easiest (but annoying) fix for this is to run 'xmake clean' to remove all artifacts, followed by 'xmake all'.