Open mediawizrd opened 3 years ago
I have the same warning messages on Microsoft Visual C++ 2019 with JUCE 6.0.7 and the latest version of the ff_meters module.
ff_meters\LookAndFeel\LevelMeterLookAndFeelMethods.h(245): warning C4702: unreachable code ff_meters\LookAndFeel\LevelMeterLookAndFeelMethods.h(102): warning C4702: unreachable code ff_meters\LookAndFeel\LevelMeterLookAndFeelMethods.h(191): warning C4702: unreachable code
Did you find a fix for this?
I can get the app to build / work, but I was never able to get rid of the warning messages.
From: r00tk1ll @.> Sent: Sunday, March 14, 2021 11:54:04 PM To: ffAudio/ff_meters @.> Cc: mediawizrd @.>; Author @.> Subject: Re: [ffAudio/ff_meters] Can't get rid of these warning messages (with the latest version of ff_meters) (#16)
I have the same warning messages on Microsoft Visual C++ 2019 with JUCE 6.0.7 and the latest version of the ff_meters module.
Did you find a fix for this?
— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHubhttps://github.com/ffAudio/ff_meters/issues/16#issuecomment-799164448, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AQAPFEU3ZLXLUBQTW5ZTSDDTDWVIZANCNFSM4PC52F4A.
Ill keep looking for a way, its just annoying really
the same for me, struggling on how to suppress these warnings
It should not have been occurred if the config option was set to false.
But since it has been a while everybody had the chance to fix the automatic channel allocation.
I removed that option including the warning. If you don't see any meters, you need to call meterSource.resize(numChannels)
in your prepareToPlay or anywhere outside the audio thread.
@ffAudio Sorry but I still see this warnings:
C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.29.30133\include\numeric(35,26): warning C4244: '=': conversion from 'double' to '_Ty', possible loss of data
1> with
1> [
1> _Ty=float
1> ] (compiling source file ....\JuceLibraryCode\include_ff_meters.cpp)
with
Looks like it's type cast issue:
if (rmsHistory.size() > 0) return std::sqrt(std::accumulate (rmsHistory.begin(), rmsHistory.end(), 0.0f)
rmsHistory - it's double but 0.0f it's float
Second this error also exists:
ff_meters\LookAndFeel\LevelMeterLookAndFeelMethods.h(245): warning C4702: unreachable code
I get the following errors with the latest version of ff_meters. I have tried a few things, but can't get them to go away.
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.26.28801\include\numeric(35,26): warning C4244: '=': conversion from 'double' to '_Ty', possible loss of data 1> with 1> [ 1> _Ty=float 1> ] (compiling source file ....\Source\MonitorCls.cpp) 1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.26.28801\include\numeric(44): message : see reference to function template instantiation '_Ty std::accumulate<_InIt,_Ty,std::plus>(const _InIt,const _InIt,_Ty,_Fn)' being compiled
1> with
1> [
1> _Ty=float,
1> _InIt=std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types>>,
1> _Fn=std::plus
1> ] (compiling source file ....\Source\MonitorCls.cpp)
1>D:\Dev\X-platform\Juce-Modules\ff_meters\LevelMeter\LevelMeterSource.h(102): message : see reference to function template instantiation '_Ty std::accumulate<std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types>>,float>(const _InIt,const _InIt,_Ty)' being compiled
1> with
1> [
1> _Ty=float,
1> _InIt=std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types>>
1> ] (compiling source file ....\Source\MonitorCls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.26.28801\include\numeric(35,26): warning C4244: '=': conversion from 'double' to '_Ty', possible loss of data
1> with
1> [
1> _Ty=float
1> ] (compiling source file ....\Source\MainOutputCls.cpp)
1>C:\Program Files (x86)\Microsoft Visual Studio\2019\Professional\VC\Tools\MSVC\14.26.28801\include\numeric(44): message : see reference to function template instantiation '_Ty std::accumulate<_InIt,_Ty,std::plus>(const _InIt,const _InIt,_Ty,_Fn)' being compiled
1> with
1> [
1> _Ty=float,
1> _InIt=std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types>>,
1> _Fn=std::plus
1> ] (compiling source file ....\Source\MainOutputCls.cpp)
1>D:\Dev\X-platform\Juce-Modules\ff_meters\LevelMeter\LevelMeterSource.h(102): message : see reference to function template instantiation '_Ty std::accumulate<std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types>>,float>(const _InIt,const _InIt,_Ty)' being compiled
1> with
1> [
1> _Ty=float,
1> _InIt=std::_Vector_const_iterator<std::_Vector_val<std::_Simple_types>>
1> ] (compiling source file ....\Source\MainOutputCls.cpp)
NOTE: There are also several places where "unreachable code" is defined, and those cause warnings as well, but I just commented out the code that caused it.