I am trying to solve huge number of warnings in a C++ project that is generated by a lot of unused variables. For example, consider this function:
void functionOne(int a, int b)
{
// other stuff and implementations :D
doSomethingElse();
runProcedureA();
}
In my project, in order to surpress the warnings I am simply casting the unused variables to void because I cannot change the methods signatures.
void functionOne(int a, int b)
{
(void)a;
(void)b;
// other stuff and implementations :D
doSomethingElse();
runProcedureA();
}
This technique works all right but I have a really huge quantity of functions that I need to do this in order to solve the warnings issue. Is there any way to auto refactor all these functions by casting all unused parameters to void?
Currently, I am working with CLion IDE and VSCODE.