Will warnings in VS2015 be fixed?


#1

Hello JUCE team. Will y'all be disabling of fixing all of the warnings in the JUCE code for Visual Studio 2015? There was around 200 last time I compiled. It makes it hard to know when I'm getting warnings in my own code. VS2015 comes out in 2 days (July 20th), so I'm sure a lot of other people will be using it too. 


#2

You are not alone...

http://www.juce.com/forum/topic/267-warnings-decleration-x-hides-function/class-member-vs2015


#3

Keep it simple for yourself and just disable the warning for your whole solution/project. It seriously hasnt done any harm except become an eye irritant.

VS2015 is the first at being zanily pedantic about shadowing with its brand new set of warnings. If they were truly problematic, something would have come up long before they were brought in.

http://blogs.msdn.com/b/vcblog/archive/2014/11/12/improvements-to-warnings-in-the-c-compiler.aspx


#4

Yes, we are in the process of fixing all those warnings. Please be patient, this will be done soon.


#5

Awesome! Thank you for letting us know. There is quite a lot of warnings. I figure that would take a while to fix. 

By the way, I back y'all for providing the new tutorials. That'll be great for people getting started. Also, it's nice to see a new version of JUCE come out. Are there anything new from the latest commits on GitHub?


#6

Fixing the warning themselves are fairly trivial, it's making sure that we haven't broken anything in the process that's delaying it!

Since these were variable shadowing warnings, if one of the references to the old name isn't updated, it'll refer to the shadowed variable now instance and compile just fine, whilst breaking anything that uses it.

So, know that we are working on it, and the only reason for the delay is that we want to make sure that we don't break your software! :)

 

 


#7

That is why long time ago i started to adopt trailing underscores for member variables ( http://stackoverflow.com/questions/3650623/trailing-underscores-for-member-variables-in-c ). I'm pretty happy of that choice at early stage. ;-)


#8

I just pushed all the compiler warning fixes for Visual Studio 2015. Please update to the newest tip!

By the way, I was testing it with the new VS2015 release from a few days ago, and not with the earlier RC version. You may still get some warnings with the RC, in this case please just update Visual Studio.


#9

Awesome! Thank you very much! All of the warnings have gone away. JUCE Demo had like 1200 I believe. Ha.


#10

There are still C4458 warnings in the examples (Plugin Host).

BTW - I find it odd that VS 2015 gives these warnings for a local variable which has the same name as a private base class member variable… I could understand if the base member variable were protected or public…

Cheers,

Rail


#11

Yeah, it seems strange that all the compilers suddenly warn about this stuff, when in the past none of them seemed to care!

We'll stamp on any warnings we see, of course. The demos are a bit less of a priority as we often allow a few warnings in demo code if it makes it more readable for a beginner.


#12

Yeah, I don't like hungarian notation. But two that I have stuck with are prepending "p" to pointers and "m_" to member variables. For everything else I let the IDE tell me the type.


#13

A few I’m seeing in the JUCE code:

\modules\juce_audio_plugin_client\VST\juce_VST_Wrapper.cpp(1377): warning C4458: declaration of ‘editor’ hides class member

\modules\juce_audio_plugin_client\VST3\juce_VST3_Wrapper.cpp(207): warning C4458: declaration of ‘valueNormalized’ hides class member

\modules\juce_audio_plugin_client\VST3\juce_VST3_Wrapper.cpp(463): warning C4458: declaration of ‘rect’ hides class member

\modules\juce_audio_processors\format_types/juce_VSTPluginFormat.cpp(898): warning C4458: declaration of ‘sampleRate’ hides class member (compiling source file …\JuceLibraryCode\modules\juce_audio_processors\juce_audio_processors.cpp)

\modules\juce_audio_processors\format_types/juce_VSTPluginFormat.cpp(989): warning C4458: declaration of ‘playHead’ hides class member (compiling source file …\JuceLibraryCode\modules\juce_audio_processors\juce_audio_processors.cpp)

\modules\juce_audio_processors\format_types/juce_VSTPluginFormat.cpp(2092): warning C4458: declaration of ‘reentrant’ hides class member (compiling source file …\JuceLibraryCode\modules\juce_audio_processors\juce_audio_processors.cpp)

Rail


#14

Thanks! Fixed in latest tip!