Author: Gerd Isenberg
Date: 10:32:54 11/05/02
Go up one level in this thread
On November 05, 2002 at 09:39:16, Uri Blass wrote:
>I get for some reason the following warning at level warning 4 that I do not
>understand.
>
>Compiling...
>main.c
>c:\program files\microsoft visual studio\vc98\include\rpcasync.h(45) : warning
>C4115: '_RPC_ASYNC_STATE' : named type definition in parentheses
>
>main.obj - 0 error(s), 1 warning(s)
>
>
>Note that this warning is not deterministic(when I compiled evaluate.c I did not
>got the warning when I compiled main.c I got that warning and after it when I
>compiled again evaluate.c I again got that warning.
>
>Uri
Hi Uri,
you include <windows.h>, which conditionally includes
<rpc.h> (remote procedure calls), which includes <rpcasync.h>.
Here you find:
typedef struct _RPC_ASYNC_STATE {
unsigned int Size; // size of this structure
....
long Reserved[4];
} RPC_ASYNC_STATE, *PRPC_ASYNC_STATE;
so the warning is correct, there is a typedef with parentheses, which may not
portable, i don't know, typical MS-behaviour. You may simply ignore it.
I use MSC++ 6.0 and always warning level 4, but don't get this warning. I guess
by some defines, the include file is not needed in "normal" win32 or MFC-Apps.
What kind of project do you have?
Win32-Application
Win32-Console Application
MFC-Application
If you look to your project settings, what are your Preprocessor definitions?
Mine are (MFC-Application):
Release:
WIN32,NDEBUG,_WINDOWS,_AFXDLL
Debug:
WIN32,_DEBUG,_WINDOWS,_AFXDLL
some sample win32 console app:
WIN32,NDEBUG,_CONSOLE,_MBCS
If nothing helps, you may use a "pragma" before including "windows.h" to
suppress the warning:
#pragma warning(disable:4115)
Regards,
Gerd
This page took 0 seconds to execute
Last modified: Thu, 15 Apr 21 08:11:13 -0700
Current Computer Chess Club Forums at Talkchess. This site by Sean Mintz.