This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

How to get rid of unused parameter warnings?

In the function:

void DoSomething(int a, int b)
{

SomeOtherFunction(a);
}

The compiler (C166) generates the warning unused parameter b. So I tried:

void DoSomething(int a, int b)
{

b;

SomeOtherFunction(a);
}

And get warning expression with possibly no effect. So I tried:

void DoSomething(int a, int /*b*/)
{

SomeOtherFunction(a);
}

And got warning non standard extension - unnamed parameter!

Anybody got any other ideas?

0