This is the mail archive of the
gdb-patches@sourceware.cygnus.com
mailing list for the GDB project.
Re: Don't cast when you could get it right in the first place
- To: Jim Blandy <jimb@cygnus.com>
- Subject: Re: Don't cast when you could get it right in the first place
- From: Andrew Cagney <ac131313@cygnus.com>
- Date: Tue, 03 Aug 1999 22:03:14 +1000
- CC: gdb-patches@sourceware.cygnus.com
- Organization: Cygnus Solutions
- References: <199907300404.XAA25909@zwingli.cygnus.com>
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''?