Compiler warnings


#1

One of the latest commits (5d35a31) added some warnings to juce_TableListBox.cpp: the “model” variable is already a member of the class and is shadowed…

please oh please jules, enable the “Hidden Local Variables” warning flag in Xcode, you have no idea how annoying it is to update JUCE to the tip and have to pinpoint these small stuff in order to have a clean build like it used to be.

However, I have fixed it here: http://github.com/yfede/JUCE/commit/2ffd39af1fe8be602b027062a95c42b150d127d9


#2

Gah, sorry, I meant to do that… Will have a look now.


#3

Jules, there are some warnings in the AAX wrapper from the current tip, I’ve fixed them easily, you may want to have a look at these changes to get them rid of them in your tip, too:


#4

Ok, thanks.


#5

Please Jules… I am coding mainly in Xcode, I know that your projects are all created with Introjucer and it may not be that easy to fiddle with warning flags there, but could we do something about these “Declaration shadows a local variable”, “Implicit conversion loses integer/floating-point precision” warnings that keep creeping into/lingering in juce’s codebase?

They are very trivial to fix and they don’t pose much of a threat, but it’s very annoying to have to polish things up after each update, not to mention the need to keep a JUCE local repository just to commit the warning-free code there.


#6

Sorry - I could have sworn that I’d increased the warning level to catch that kind of thing! Anyway, I’ve bumped up the warnings for the demo and introjucer apps now, so I shouldn’t let any of those warnings get through again.


#7

Thank you very much! Really appreciated :slight_smile:


#8

Sorry, these warning flags are causing havoc in older versions of GCC/LLVM, so I’ll have to remove them again (this might be why I didn’t already have them in there). I’ll try to remember to enable them occasionally and check them - I’m sure you’ll remind me if I forget to do that :wink:


#9

Too bad :frowning:

Of course I will, but that’d seem impratical because it’d require always some additional steps: you commit, I sometimes merge, notice the warnings, report on the forum, you check, fix and commit them, I merge again…

Couldn’t you just add those flags to a projects that’s not part of the juce repository so it doens’t break other people’s attempt to build it? maybe a personal project of yours (ahem Tracktion ahem), or whatever you compile often with the latest JUCE tip.


#10

Yes - I have done that now.


#11

celebrating in the streets :slight_smile: