Hello, Claire!
Warning is generated, because value 0x8010002F exceeds the valid range of
int type.
Due to sign information max value of int is 2^31
You can use uint instead of int. uint max value is 2^32. Or use cast to
uint.
if ((uint)m_nError != 0x8010002F) foobar;
--
With best regards, Vadym Stetsiak.
Blog:
http://vadmyst.blogspot.com
You wrote on Mon, 3 Sep 2007 10:52:42 +0100:
C"Comparison to integral constant is useless; the constant is outside
Cthe range of type 'int'"
CHow can I fix this compiler warning, please, for the following
Cpseudocode?
Cint m_nError;
Cm_nError = somedriverapi.DoSomething();
Cif (m_nError != 0x8010002F) foobar; << compiler warning here
Cthankyou
CClaire