This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Warning in a cygwin header when using both -Wall and -W
- From: Daniël Hörchner <dbjh at gmx dot net>
- To: cygwin at cygwin dot com
- Date: Wed, 14 May 2003 16:42:02 +0200
- Subject: Warning in a cygwin header when using both -Wall and -W
Hi,
The following code generates a warning for cygwin/cygwin_dll.h when _both_
-Wall and -W are specified at the same time:
------8<------
#include <cygwin/cygwin_dll.h>
DECLARE_CYGWIN_DLL(DllMain);
------8<------
Say, the code above was saved to a file test.c. The warning can be seen when
using a command line like:
gcc -c test.c -Wall -W
It is caused by this code in cygwin/cygwin_dll.h:
static int __dllMain (int a, char **b, char **c) \
{ \
return Entry (storedHandle, storedReason, storedPtr); \
} \
However, it can easily be avoided by changing that code into:
static int __dllMain (int a, char **b, char **c) \
{ \
(void) a; \
(void) b; \
(void) c; \
return Entry (storedHandle, storedReason, storedPtr); \
} \
If you reply, please send a carbon copy to dbjh AT gmx DOT com as I'm not a
member of this mailing list.
Kind regards,
Daniel Horchner
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/