Q:

Passing pointer to a function

//old and auqHdr are data structures of type gblAuqEntry and auQ respectively
//I traverse through the list 'auqHdr' and when I match the element 'old', I need to remove it

removeAUfromNodeAUQ(&old, &auqHdr);  

//Function implementation
static void removeAUfromNodeAUQ(gblAuqEntry *old, auQ *auqH)
{
    auQ *auqPtr, *prev;
int found =0;
for (auqPtr = auqH; auqPtr; auqPtr = auqPtr->nxt)
{
    if (something)
        prev = auqPtr;
    else
    {
        prev->nxt = old->nxt;
        found = 1;
        break;
    }
} 

I am trying to remove the element 'old' in the list 'auqHdr'. 
The error I am getting is "declaration is incompatible with previous "removeAUfromNodeAUQ""
Can someone please point out what I am doing wrong here?
Thanks

A:

If you call the function before declaring it, C implies a return type of int, not void. 
You should add this declaration in the header or at the top of your file to address the problem:
static void removeAUfromNodeAUQ(gblAuqEntry *old, auQ *auqH);

