0

I was working and suddenly I faced a function like that:

void func(SomeStruct *parameter) { (void)parameter; }

I could not wrap my head on what it does. I mean, there is a function func which the only thing it does is (void)parameter; but I can't get what (void)parameter; is doing int this example.

Would someone mind to explain me, please?

MustSee
  • 121
  • 2
  • 7
  • 1
    [What does casting to `void` really do?](https://stackoverflow.com/questions/34288844/what-does-casting-to-void-really-do) and [Why cast unused return values to void?](https://stackoverflow.com/questions/689677/why-cast-unused-return-values-to-void) – Jason Oct 07 '22 at 11:37

0 Answers0