mouseUp - unreferenced formal parameter


I’ve overriten function mouseUp(const MouseEvent& e).
But I get Warning: ‘e’: unreferenced formal parameter

I suppose it’s because I don’t use parameter ‘e’ anywhere. So should I?
If I should, then how to use it?

At all how to get rid of such warning?

Best Regards


You don’t have to, if you don’t need it.

The warning goes away, either if you remove the argument name in the implementation like:

void mouseUp(const MouseEvent&) override

or you add a fake method ignoreUnused (comes with juce), that pretends to use it:

ignoreUnused (e);