Fixed compilation warnings reported by GCC/Clang

src/s_environment.cpp:908:6: warning: variable 'v' is used uninitialized whenever 'if' condition is false [-Wsometimes-uninitialized]
src/s_environment.cpp:908:26: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
src/s_environment.cpp:934:26: warning: comparison of integers of different signs: 'int' and 'unsigned long' [-Wsign-compare]
This commit is contained in:
alexey.lysiuk 2018-01-20 14:59:29 +02:00
parent 16461e0d59
commit c840368446

View file

@ -903,9 +903,9 @@ DEFINE_ACTION_FUNCTION(DReverbEdit, GetValue)
{
PARAM_PROLOGUE;
PARAM_INT(index);
float v;
float v = 0;
if (index >= 0 && index < countof(ReverbFields))
if (index >= 0 && index < (int)countof(ReverbFields))
{
auto rev = &ReverbFields[index];
if (rev->Int != nullptr)
@ -931,7 +931,7 @@ DEFINE_ACTION_FUNCTION(DReverbEdit, SetValue)
PARAM_INT(index);
PARAM_FLOAT(v);
if (index >= 0 && index < countof(ReverbFields))
if (index >= 0 && index < (int)countof(ReverbFields))
{
auto rev = &ReverbFields[index];
if (rev->Int != nullptr)