tech-userlevel archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
Re: [PATCH] pcictl: simplify its usage
In message <20090604072326.198570%gmx.net@localhost>, "Christoph Egger" writes:
>
>(Resend, this time with the correct subject. I'm not subscribed
>on tech-userlevel, so I c&p the mail from the archive.)
Ahh, okay.
>argv is passed through to getopt(). getopt() expects argv
>as char * const [] or implicitely converts argv into this.
>I tried const char *[] but this results in a warning when argv
>is passed to getopt().
It would.
>So either we go the "char * const []" way or leave it as is.
>All other variants of const'ification produce a warning.
I would say leave it as is. It is harmless to pass a non-const-qualified
type to a function expecting a const-qualified type. There is no actual
const qualification in the formal type of main, and I don't think we need
to add one.
-s
Home |
Main Index |
Thread Index |
Old Index