News for hackers. Stuff that matters.
Re:Hey, C Is a Functional Language Too by slig on Friday November 02, 2012 @08:43AM (#4732332)
Quick question: why does he do this?

    int main(int argc, char * argv[]) {
      (void)argc;
      (void)argv;
I've programmed C while in school, but I don't remember ever seeing this and I'm not sure how to google it.
Re:Hey, C Is a Functional Language Too by walrus on Friday November 02, 2012 @08:45AM (#4732338)
It stops the compiler from complaining about unused variables:

http://stackoverflow.com/questions/8052091/void-cast-of-argc...

Re:Hey, C Is a Functional Language Too by tmhedberg on Friday November 02, 2012 @12:50PM (#4733532)
Why would you do this instead of declaring it as `int main(void)`?
Re:Hey, C Is a Functional Language Too by jvranish on Friday November 02, 2012 @09:27AM (#4732495)
I use clang with a -Wall and -Wextra, which will complain about all sorts of stuff I generally want to know about, including unused variables (I think gcc does the same?). For the rare cases where I actually want to leave a variable unused I do the above to make the warning go away.