I got some code and trying to removing all warning for the given code.
While for certain function like:
sub_main(int /*argc*/, char** /*argv*/){
-------------
obj1* ptr1 = new obj1(xxx);
obj2* ptr2 = obj1->xxxx(xxxx)
-------------
}
While this ptr1 and ptr2 is not used in this function at all. (It should be used somewhere since if I comment them out,I got certain errors).
And there are some ways to slient the warning for unused parameters like
sub_main(int /*argc*/ )
or
sub_main(int a _ _ attribute_ _ ((unused)))
While for unused variables, is there any similiar neat way to slient the warning?
I don't want to do some ifdef for gcc to remove warning or silient the warning in makefile.
Thanks.