4 ms·
Seeing I wasn't using it, I thought I might hint to the optimiser that it could optimise it away. But now that you mention it, the argv should have been const c
by AdamWynne 16y ago
Seeing I wasn't using it, I thought I might hint to the optimiser that it could optimise it away. But now that you mention it, the argv should have been const char * const
- cperciva 16y agoThe optimizer is quite able to recognize that a variable is unused. :-) In fact, if you compile that code with warnings turned on, you'll get a "variable is not used" warning -- which most style guides say should be silenced by adding the following line to the start of your function: (void)argc; /* UNUSED */