> Errrr.. this was the whole point of this thread.  I *can't* cast
> a (const char *) to a (char *) when using the -Wcast-qual gcc flag -

Not all -W options are equally useful and some are actively harmful.

This is one of them. There are several situations where it is
necessary to remove a qualifier (any code for strchr, e.g.).
Adding nonportable hacks to your code to avoid a gcc error message
is just plain bad coding.

Perhaps gcc has a way to turn off warnings temporarily; I haven't
checked lately. If not, roll your own. Define a comment like
/*CASTOK*/, to stick on each line with such a cast, then filter
the gcc output using a script that examines the source code for
such comments and removes the bogus error messages.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to