What is significance/use of doing void(param); at the start of function?
c, c++
Solution
This suppresses the "unused argument" warnings. Those statements do nothing, but count as using the argument.
Problem
I was just going thro' source code of Yahoo's Trafic Server It is written in C++. In almost all methods (from one of modules), they do void(param) on each param that function receive. (Eg below) Can someone explain what this could be for ? ``` int some_method_name(caddr_t addr, size_t len, caddr_t end, int flags) { (void) end; (void) addr; (void) len; (void) end; (void) flags; ...... .... } ``` PS: For actual source code, please see methods from http://github.com/apache/trafficserver/blob/trunk/iocore/eventsystem/SocketManager.cc