From: ashieh on
Hi all,

I've been having some frustrating errors on the DDK compiler. In my build
output, I get many C2220 errors that are not accompanied with a warning,
which forces me to puzzle out what warning (i.e. unused parameter,
uninitialized variable) is preventing compilation from happening.

Note that this only happens in later compilation phases (looks like it
always happens with some kind of optimization or dataflow pass, not in
parsing or semantic analysis).

Error 1 error C2220: warning treated as error - no 'object' file
....

How do I change my build environment to fix this?

If this is not possible, is there a comprehensive list of warnings that
causes a silent C2220?

Is it possible to disable some warnings (i.e. disable the one that triggers
when an if statement has a constant condition)?
From: Don Burn on
The sources file you are using is using /WX on the MSC_WARNING_LEVEL line.
You should have seen the warnings before this, fix the warnings that is a
better and safer way to handle this. For unused parameters use the
UNREFERENCED_PARAMETER or DBG_UNREFERENCED_PARAMETER to eliminate the error.
An unitialized variable is a bug, fix it.


--
Don Burn (MVP, Windows DKD)
Windows Filesystem and Driver Consulting
Website: http://www.windrvr.com
Blog: http://msmvps.com/blogs/WinDrvr
Remove StopSpam to reply



"ashieh" <ashieh(a)discussions.microsoft.com> wrote in message
news:70FEDAD4-7EAA-4B62-A652-DB1C6C38C554(a)microsoft.com...
> Hi all,
>
> I've been having some frustrating errors on the DDK compiler. In my build
> output, I get many C2220 errors that are not accompanied with a warning,
> which forces me to puzzle out what warning (i.e. unused parameter,
> uninitialized variable) is preventing compilation from happening.
>
> Note that this only happens in later compilation phases (looks like it
> always happens with some kind of optimization or dataflow pass, not in
> parsing or semantic analysis).
>
> Error 1 error C2220: warning treated as error - no 'object' file
> ...
>
> How do I change my build environment to fix this?
>
> If this is not possible, is there a comprehensive list of warnings that
> causes a silent C2220?
>
> Is it possible to disable some warnings (i.e. disable the one that
> triggers
> when an if statement has a constant condition)?
>
> __________ Information from ESET NOD32 Antivirus, version of virus
> signature database 4782 (20100118) __________
>
> The message was checked by ESET NOD32 Antivirus.
>
> http://www.eset.com
>
>
>



__________ Information from ESET NOD32 Antivirus, version of virus signature database 4782 (20100118) __________

The message was checked by ESET NOD32 Antivirus.

http://www.eset.com




From: Hannes on
If you see these "orphan" messages, it may be that the warnings have for some
reason disappeared from your compilation output window. Look for additional
warnings in the various log files created during the build (*.log, *.wrn)

/ Hannes.

"ashieh" wrote:

> Hi all,
>
> I've been having some frustrating errors on the DDK compiler. In my build
> output, I get many C2220 errors that are not accompanied with a warning,
> which forces me to puzzle out what warning (i.e. unused parameter,
> uninitialized variable) is preventing compilation from happening.
>
> Note that this only happens in later compilation phases (looks like it
> always happens with some kind of optimization or dataflow pass, not in
> parsing or semantic analysis).
>
> Error 1 error C2220: warning treated as error - no 'object' file
> ...
>
> How do I change my build environment to fix this?
>
> If this is not possible, is there a comprehensive list of warnings that
> causes a silent C2220?
>
> Is it possible to disable some warnings (i.e. disable the one that triggers
> when an if statement has a constant condition)?
From: Maxim S. Shatskih on
> If this is not possible, is there a comprehensive list of warnings that
> causes a silent C2220?

Look at .log and .wrn files.

--
Maxim S. Shatskih
Windows DDK MVP
maxim(a)storagecraft.com
http://www.storagecraft.com

From: Larry Futrell on
ashieh wrote:
> Hi all,
>
> I've been having some frustrating errors on the DDK compiler. In my build
> output, I get many C2220 errors that are not accompanied with a warning,
> which forces me to puzzle out what warning (i.e. unused parameter,
> uninitialized variable) is preventing compilation from happening.
>
> Note that this only happens in later compilation phases (looks like it
> always happens with some kind of optimization or dataflow pass, not in
> parsing or semantic analysis).
>
> Error 1 error C2220: warning treated as error - no 'object' file
> ...
>
> How do I change my build environment to fix this?
>
> If this is not possible, is there a comprehensive list of warnings that
> causes a silent C2220?
>
> Is it possible to disable some warnings (i.e. disable the one that
> triggers when an if statement has a constant condition)?

If you want to see the warnings in the window with the rest of the build
output, just run build with /w as one of the arguments.

--
Larry Futrell