This is the mail archive of the gdb-patches@sourceware.cygnus.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Don't cast when you could get it right in the first place


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''?

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]