delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/05/14/10:43:46

Message-Id: <200305141443.h4EEhkX25814@delorie.com>
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
From: =?iso-8859-15?q?Dani=EBl=20H=F6rchner?= <dbjh AT gmx DOT net>
To: cygwin AT cygwin DOT com
Subject: Warning in a cygwin header when using both -Wall and -W
Date: Wed, 14 May 2003 16:42:02 +0200
MIME-Version: 1.0

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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019