Warning in juce_mac_Windowing.mm


#1

From:

line 329 (line 336 in tip) generates an Unused variable ‘session’ warning in Xcode.

Rail


#2

Which version of Xcode and which compiler flags are you using?


#3

Xcode 8.2.1

I’m using a 3rd party LLVM Compiler… no special flags… you don’t see this warning?

Rail


#4

No. I can’t get the compiler to complain, even with every unused warning turned on!

It would be good to find a solution to this, as VS is much better in this regard. It’s annoying when developing in Xcode to only be alerted to similar problems by our CI tools, rather than in the IDE.


#5

Well this gets rid of the warning:

                if (auto* session = [view beginDraggingSessionWithItems: dragItems
                                                                  event: event
                                                                 source: helper])
                    {
                    ignoreUnused (session);
                    
                    return true;
                    }

Rail


#6

Already fixed :slight_smile: