Re: PREfast: Different outcome if compiled with or without?
From: Ray Trent (ratrent_at_nospam.nospam)
Date: 02/18/05
- Next message: Marc Reinig: "Re: ERROR_CRC when reading from USB"
- Previous message: Ray Trent: "Re: install hid driver"
- In reply to: Spiro Trikaliotis: "PREfast: Different outcome if compiled with or without?"
- Next in thread: Spiro Trikaliotis: "Re: PREfast: Different outcome if compiled with or without?"
- Reply: Spiro Trikaliotis: "Re: PREfast: Different outcome if compiled with or without?"
- Messages sorted by: [ date ] [ thread ]
Date: Fri, 18 Feb 2005 13:35:34 -0800
What's the error message?
Spiro Trikaliotis wrote:
> Hello,
>
> I just had a somehow unexpected result: I compiled a driver which
> compiles perfectly ("build -cZ") with PREfast (driver specific rules),
> that is, "prefast build -cZ".
>
> Somehow, the compilation breaks if I use prefast. I tracked it down to
> the following statement:
>
> signal(SIGINT, reset);
>
> Somewhere else, there is the following function definition:
>
> static void ARCH_SIGNALDECL reset(int dummy)
> { ... }
>
> and, in some header file, there is:
>
> #ifdef WIN32
> #define ARCH_LINUX_WINDOWS( _linux, _windows) _windows
> #else
> #define ARCH_LINUX_WINDOWS( _linux, _windows) _linux
> #endif
> #define ARCH_SIGNALDECL ARCH_LINUX_WINDOWS(/* no decl needed */, __cdecl)
>
>
> Yes, I AM sure that this header file is included before. ARCH_SIGNALDECL
> is not defined anywhere else, but the compiler does not complain about
> ARCH_SIGNALDECL not defined, but about not being able to convert reset()
> from __stdcall to __cdecl.
>
> Now, if I replace
>
> static void ARCH_SIGNALDECL reset(int dummy)
> { ... }
>
> through
>
> static void __cdecl reset(int dummy)
> { ... }
>
> everything works fine.
>
>
> Well, the most interesting part is: If I do NOT use prefast, even the
> first version works perfectly. It works perfectly, too, if I replace
>
> #define ARCH_SIGNALDECL ARCH_LINUX_WINDOWS(__cdecl, __cdecl)
>
> Now, I ask myself what changes PREfast does to the compiler?
>
> I do not understand why this compiles perfectly without PREfast, but
> does not compile with PREfast.
>
> Ah, I forgot: This happens with PREfast 1.5.2402 (2K3 SP1 RC1 DDK,
> 3790.1289), as well as with 2K3 DDK (3790) - in the latter case,
> obviously without the driver specific rules.
>
> Can anybody give me a good hint on what is going on?
>
> Regards,
> Spiro.
>
-- ../ray\..
- Next message: Marc Reinig: "Re: ERROR_CRC when reading from USB"
- Previous message: Ray Trent: "Re: install hid driver"
- In reply to: Spiro Trikaliotis: "PREfast: Different outcome if compiled with or without?"
- Next in thread: Spiro Trikaliotis: "Re: PREfast: Different outcome if compiled with or without?"
- Reply: Spiro Trikaliotis: "Re: PREfast: Different outcome if compiled with or without?"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|