This is the mail archive of the
mailing list for the GDB project.
Re: [RFC] trying to kill a warning in hpread.c (from call to complaint)
- From: Andrew Cagney <ac131313 at redhat dot com>
- To: Daniel Jacobowitz <drow at mvista dot com>
- Cc: gdb-patches at sources dot redhat dot com
- Date: Fri, 10 Jan 2003 11:08:37 -0500
- Subject: Re: [RFC] trying to kill a warning in hpread.c (from call to complaint)
- References: <20030110142639.GC30359@gnat.com> <20030110143454.GA3492@nevyn.them.org>
Nope. The original code was broken:
complaint (&symfile_complaints, "bad string table offset in symbol %d", \
(char *) symnum); \
*NAMEP = ""; \
*NAMEP = (SYM)->dsfile.name + VT (OBJFILE)
I think that the warning comes from the call to complaint where the
format string contains "%d", but the next parameter is casted to a
Is the cast to "char *" necessary? Can/Should I remove it?
Looks like a typo in Kevin's complaint patch.
complain (&string_table_offset_complaint, (char *) symnum);
(complaint -> complaints finds another victim / bug).
> I'd say yes; and in the calls to lbrac_unmatched_complaint, too.
Joel, if you encounter a macro, first thing to do is always to convert
it to a function :-)