, ( !). - . . , GCC
gcc -Wall yourcode.c
yourcode.c: In function ‘fill’:
yourcode.c: 11:5: warning: implicit declaration of function ‘send’
yourcode.c: At top level:
yourcode.c:15:5: warning: return type defaults to ‘int’
yourcode.c:22:5: warning: return type defaults to ‘int’
yourcode.c: In function ‘send’:
yourcode.c:26:5: warning: control reaches end of non-void function
yourcode.c: In function ‘main’:
yourcode.c:19:5: warning: control reaches end of non-void function
, send . send, (, -, void, ). main int
return 0;
.
yourcode.c: In function ‘fill’:
yourcode.c:12:5: error: incompatible type for argument 1 of ‘send’
yourcode.c.c:7:6: note: expected ‘struct xxx *’ but argument is of type ‘struct xxx’
and you will notice that you have one redundant * in
send(*create);
which casts your pointer. Note. You do NOT want to dereference your pointer, because you need to forward the pointer to send, not the value. Change the line to
send(create);
et Voilà.
source
share