This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [patch] serial, mdebugread, top.c, utils, frame.c: remove unused variables
- From: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- To: Michael Snyder <msnyder at vmware dot com>
- Cc: "gdb-patches at sourceware dot org" <gdb-patches at sourceware dot org>
- Date: Sat, 8 May 2010 23:11:55 +0200
- Subject: Re: [patch] serial, mdebugread, top.c, utils, frame.c: remove unused variables
- References: <4BE363CE.2000807@vmware.com>
On Fri, 07 May 2010 02:50:22 +0200, Michael Snyder wrote:
> static void
> do_fclose_cleanup (void *arg)
> {
> - FILE *file = arg;
> fclose (arg);
> }
I believe the intentional was rather `fclose (file);' according to the general
GDB template of callback functions:
void
func (void *arg)
{
real_type *var = arg;
Use VAR having it type-checked callee prototypes or real_type changes.
}
But I understand it is a nitpick for never-changing FILE * and fclose.
Regards,
Jan