Don't cast when you could get it right in the first place
Andrew Cagney
ac131313@cygnus.com
Tue Aug 3 05:04:00 GMT 1999
Jim Blandy wrote:
>
> I'm committing this change without approval, because it's so dumb. If
> I've stepped on anything here, I'll feel real dumb.
Since I made many of the original check ins (adding the type cast) it is
probably useful if I comment :-)
Thanks.
Going through and re-doing the remaining calls to make_cleanup() is on
my list of things to do one day. For the cases you've changed, they are
straight forward - the void* argument is a dummy.
If anyone else is feeling inspired - the remaining type casts need to be
removed as they violate the strictest ISO-C rules. For more complex
cases could I suggest looking at utils.c:make_cleanup_freeargv() as a
guideline. It allows stronger parameter type checking.
enjoy,
Andrew
PS: Seeing as we're using ISO-C, can we eliminate ``PTR''?
More information about the Gdb-patches
mailing list