man 2 exit =>
Quote:
_EXIT(2) Linux Programmer's Manual _EXIT(2)
NAME
_exit, _Exit - terminate the current process
SYNOPSIS
#include <unistd.h>
void _exit(int status);
#include <stdlib.h>
void _Exit(int status);
DESCRIPTION
...
|
The warning should go away if you #include <stdlib.h> (which, in turn, has the correct function prototype for "exit()").
Just FYI, you should *not* try to declare your own functions if there's a valid header available - ALWAYS try to use an existing header file FIRST.
I was recently using the binary of a product that was compiled under Linux 2.4 ... and WOULD NOT WORK under Linux 2.6 ... all because the programmer innocently coded "extern errno" instead of "#include <errno.h>".
Moral: If there's a header, use it. If you don't know what the header is, look it up ("man", MSDN DevHelp ... or even Google, if necessary).
IMHO .. PSM