On Mon, 16 Jan 2023 02:32:58 -0600 Igor Korot wrote:
IK> Hi, ALL,
IK> I'm using the latest release on all 3 major platforms.
IK> Compiling my code on Mac with Xcode (OSX 10.13, Xcode 9.4),
IK> I'm getting following warnings:
IK> int value = m_config->Read( "my_key", 2 );
IK> Implicit conversion loses integer precision: long to int
IK> Is it possible to silence that warning somehow?
IK> The value read is in the range of [1..4].
You can, of course, just add an explicit case after checking that the
value is in the expected range. You also can use
if ( m_config->Read("my_key", &value, 2) )
which would avoid the warning but you'd still need to check the range.
TT-Solutions: wxWidgets consultancy and technical support