Is there any good reason why a C function or Objective-C method that has a non-void return value should be cast to void when the return value is unused? I see this all the time in a certain project.
For example:
I just compared the assembly for a tiny test project and it appears identical, so I suppose it's something leftover from an older time when it did make a difference?
For example:
Code:
extern int myFunc();
...
(void)myFunc();
// vs
myFunc();
I just compared the assembly for a tiny test project and it appears identical, so I suppose it's something leftover from an older time when it did make a difference?