[wdmaudiodev] Re: How to turn of "Warning treated as error" of build???

  • From: "Volker Moebius" <Volker.Moebius@xxxxxxxx>
  • To: <wdmaudiodev@xxxxxxxxxxxxx>
  • Date: Sun, 9 Feb 2003 18:08:04 +0100


Always
    ShortVal = (SHORT)(ShortVal + DoubleVal)
or in C++ - Style
    ShortVal = static_cast<SHORT>(ShortVal + DoubleVal)
should compile without problems.

***But*** using floating point arithmetic within kernel mode isn't trivial
and should be avoided. There are several discussions in news goups and - as
far as I can remember - even in this mailing list regarding this subject.

The /Wx (Treat all warnings as errors) compiler option can not be overridden
if once added to compiler command line. You could tinker with some build
utility macros like MSC_WARNING_LEVEL to work around your problem but these
are IMHO bad practices.


Regards
Volker

----- Original Message -----
From: "Frank" <virtual@xxxxxxxxxxxxxx>
To: <wdmaudiodev@xxxxxxxxxxxxx>
Sent: Sunday, February 09, 2003 4:53 PM
Subject: [wdmaudiodev] How to turn of "Warning treated as error" of build???


>
>
> using DDK 2600.1106, the error message is:
> error C2220: warning treated as error - no object file generated
> error C4244: '+=' : conversion from 'double' to 'SHORT', possible loss of
> data
>
> how to turn of the C2220 error of the build utility in DDK??
>
> or, does anyone know how to convert double to short in driver
> programming? I tried the cast method, but it doesn't work.
> Thanks for help!!
> ******************
>
> WDMAUDIODEV addresses:
> Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
> Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
> Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
> Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx
>
> URL to WDMAUDIODEV page:
> http://www.wdmaudiodev.de/
>

******************

WDMAUDIODEV addresses:
Post message: mailto:wdmaudiodev@xxxxxxxxxxxxx
Subscribe:    mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=subscribe
Unsubscribe:  mailto:wdmaudiodev-request@xxxxxxxxxxxxx?subject=unsubscribe
Moderator:    mailto:wdmaudiodev-moderators@xxxxxxxxxxxxx

URL to WDMAUDIODEV page:
http://www.wdmaudiodev.de/

Other related posts: