Re: [PATCH 3/3] Silence a compiler warning.
On Fri, Jan 07, 2011 at 12:31:07AM +0100, Ferenc Wagner wrote:
> Ferenc Wagner <wferi@niif.hu> writes:
>
> > - execvp("udhcpc", arguments);
> > + /* execvp doesn't like const strings for no reason, so we can
> > + cast away the const to suppress the compiler warning */
> > + execvp("udhcpc", (char **)arguments);
>
> Actually, I started to feel bad about this part. Maybe it would be
> wiser to use non-const strings from the beginning? That would require a
> larger patch, though... And ignoring the warning hasn't caused any
> trouble yet. Does anybody know why execvp hates const strings?
I have no idea. I've fixed those build warnings (and the "address of <foo>
will always evaluate to true" warnings) in my tree; I'm not going to push
them for squeeze, though.
- Matt
Reply to: