This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
MinGW compilation warnings in libiberty's waitpid.c
- From: Eli Zaretskii <eliz at gnu dot org>
- To: gcc-patches at gcc dot gnu dot org
- Cc: gdb-patches at sourceware dot org
- Date: Mon, 08 May 2017 18:27:18 +0300
- Subject: MinGW compilation warnings in libiberty's waitpid.c
- Authentication-results: sourceware.org; auth=none
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
When compiling libiberty (as part of GDB) with MinGW on MS-Windows, I
see the following warning:
gcc -c -DHAVE_CONFIG_H -O2 -gdwarf-4 -g3 -D__USE_MINGW_ACCESS -I. -I./../include -W -Wall -Wwrite-strings -Wc++-compat -Wstrict-prototypes -pedantic -D_GNU_SOURCE ./waitpid.c -o waitpid.o
./waitpid.c: In function 'waitpid':
./waitpid.c:31:18: warning: implicit declaration of function 'wait' [-Wimplicit-function-declaration]
int wpid = wait(stat_loc);
^
The file waitpid.c should not be built on MinGW, as it is not needed
on Windows, and will not work if the function is called (because
there's no 'wait' function on MS-Windows).