cocos2d / cocos2d-x

Cocos2d-x is a suite of open-source, cross-platform, game-development tools utilized by millions of developers across the globe. Its core has evolved to serve as the foundation for Cocos Creator 1.x & 2.x.
https://www.cocos.com/en/cocos2d-x
18.22k stars 7.06k forks source link

Many warnings from unused function parameters #18415

Open ahcox opened 7 years ago

ahcox commented 7 years ago

Steps to Reproduce:

  1. Open default generated project in Clion on Mac.
  2. Build Cocos

The code has many functions with unused parameters such as these in https://github.com/cocos2d/cocos2d-x/blob/v3/cocos/ui/UIEditBox/UIEditBoxImpl-common.h:

virtual void setAnchorPoint(const Vec2& anchorPoint) override {}
virtual void setPosition(const Vec2& pos) override {}

They yield a noisy build full of warnings.

Some example build output:

cocos2d/cocos/base/CCScriptSupport.h:804:41: warning: unused parameter 'obj' [-Wunused-parameter]
virtual void removeObjectProxy(Ref* obj) {}

cocos2d/cocos/audio/apple/AudioEngine-inl.mm:636:36: warning: unused parameter 'dt' [-Wunused-parameter]
void AudioEngineImpl::update(float dt)

...
minggo commented 7 years ago

we are continue fixing it