I have the following function:
void foo(char *ptr_1)
{
char *ptr_2;
bar(ptr_2);
ptr_1 = ptr_2;
}
And get this warning:
parameter "ptr_1" was set but never used
I understand that the warning is technically true, but is irrelevant at the same time. I could suppress it with:
(void)(ptr_1)
But is there a better way?