lcm-proj / lcm

Lightweight Communications and Marshalling
GNU Lesser General Public License v2.1
980 stars 388 forks source link

unused parameter ‘rbuf’ #321

Closed Joechencc closed 4 years ago

Joechencc commented 4 years ago

When I run the example of listener.cpp, error pops up for unused parameter 'rbuf', it might be due to makefile?

error: unused parameter ‘rbuf’ [-Werror=unused-parameter] void handleMessage(const lcm::ReceiveBuffer *rbuf, const std::string &chan,

I wonder where in the code rbuf is used and how should I fix this problem?

The operation system is : ubutu 16.04 LTS and gcc version is (Ubuntu 5.4.0-6ubuntu1~16.04.12) 5.4.0 20160609

hoxell commented 4 years ago

Try adding -Wno-unused-parameter to turn off that warning/error for the purpose of building this example.

I wonder where in the code rbuf is used and how should I fix this problem?

It's not used, which is what the error tells you 😉