This is the mail archive of the
gdb-patches@sources.redhat.com
mailing list for the GDB project.
Re: [RFC] trying to kill a warning in hpread.c (from call to complaint)
On Fri, Jan 10, 2003 at 11:08:37AM -0500, Andrew Cagney wrote:
>
> >> complaint (&symfile_complaints, "bad string table offset in symbol
> >> %d", \
> >> (char *) symnum); \
> >> *NAMEP = ""; \
> >> } \
> >> else \
> >> *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
> >>"char *".
> >>
> >>Is the cast to "char *" necessary? Can/Should I remove it?
> >
> >
> >Looks like a typo in Kevin's complaint patch.
>
> Nope. The original code was broken:
>
> complain (&string_table_offset_complaint, (char *) symnum);
>
> (complaint -> complaints finds another victim / bug).
Agh! CVS logs foil me again!
No offense intended to Kevin.
--
Daniel Jacobowitz
MontaVista Software Debian GNU/Linux Developer