in this function
char *function(buf,salt)
char *buf;
char *salt;
{
function_body
}
I get this error
error: argument "buf" doesn't match prototype
error: prototype declaration
argument "salt" doesn't match prototype
error: prototype declaration
This is the actual code:
char * function(const char *, const char *);
char *buffer = NULL;
buffer = function(arg1, arg2);
You have a prototype declaration of
function()somewhere and the actual function declaration does not match it. In your case the (type of the) parameters is different.Usually, the errors show the location of the prototype. Look it up and compare it with your function declaration. The function arguments and their types must be exactly identical.
In your updated qustion you say that the prototype is defined as:
So you also need to define your actual function as
(It needs to be identical, so including the
const-statements!)