q_node * pop(Queue * que) {
if ((que->size == 0) || (que == NULL)) return null;
q_node * item = que->head;
if (freeNode(que)) {
que->size--;
return item;
} else return null;
}
When I try to compile I get the above warning for the bottom line of this function. The structs q_node and Queue compiled with no problems, as did freeNode()…any ideas what I’m doing wrong?
I also get the error “null undeclared” for the first if statement line.
remove the else statement is useless. No warnings now ^_^
Gcc see you miss a return statement at the end and is letting you know just in case.
EDIT: null -> NULL