Hi any one please tell me why the warning is generated when the address of pointer to a local variable is passed.
The following is the warning generated:
Icore.c:228: warning: passing argument 3 of foo from incompatible pointer type
The function declaration is:
int foo(void * , int , void**);
The following is the function definition:
int foo (void * inputbuffer, int sizeofinputbuffer, void** outputbuffer)
{
................
.............
}
The above function is invoked as:
unsigned char inputbuffer[] = {0x34,0x45,0x67,0x12,0x76};
int sizeofinputbuffer = 5;
unsigned char * outputbuffer = NULL;
int Total ;
Total = foo (inputbuffer, sizeofinputbuffer, &outputbuffer);
Thanks,
Prashanth