When using a API that uses callback functions there is sometimes not necessary to use at all parameters that the callback function prototype declares.
A example a API defines a callback function handleEvent as follows.
|
|
In your application you implement this function to see when a Foo Event occurs.
|
|
In this case the compiler will see that we don’t use the paramater event and generate a warning.
|
|
If we are the author of the API we could remove the parameter alltogether since we don’t use it but in other cases we need to "trick" the compiler into thinking we use the parameter.
|
|
Note: You could also just ignore the warning since the application will be build anyway. But in some cases it clutters the compiler output.