Hacker News new | past | comments | ask | show | jobs | submit login

I agree that (void)bla is desirably clear, pithy and unambiguous. And I like something like this if I'm dealing with functions with more than a couple unused parameters:

    static void unused_(int x, ...) { (void)x; }
    #define unused(...) unused_(0, __VA_ARGS__)
This way you can just have one `unused(foo,bar,baz,quux);` line at the top of the function listing all unused parameters.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: