PATCH PING: fix three libgcov warnings
Tue Jan 20 08:28:00 GMT 2009
(Re-sending, as I think this message was lost.)
> sorry, I looked at this before, but got confused. I don't understand how the
> type of execl's (char *) argument is relevant to the initialization of one of
> the elements of that array. You're not changing the execl calls.
I probably spent more effort on that part of my explanation than was
necessary. The point I was trying to make is that the cast cannot be
eliminated because the prototypes of the execl* and execv* functions
make it necessary to discard the const qualifier; no way around it.
The warning is produced because the existing cast to char * discards the
qualifier. We need a cleverer way of discarding the const qualifier,
> - args = (char *) arg;
> + args = (void *) (intptr_t) arg;
I'm open to suggestions :-) (including adding a comment).
More information about the Gcc-patches