This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
RE: [ARI/commit] enhance suggestion in "sprintf" rule (was: "Re: [commit] Re: New ARI warning Sat May 28 01:53:47 UTC 2011")
> -----Message d'origine-----
> De?: gdb-patches-owner@sourceware.org [mailto:gdb-patches-
> owner@sourceware.org] De la part de Joel Brobecker
> Envoyé?: lundi 30 mai 2011 21:59
> À?: gdb-patches@sourceware.org
> Objet?: [ARI/commit] enhance suggestion in "sprintf" rule (was: "Re:
> [commit] Re: New ARI warning Sat May 28 01:53:47 UTC 2011")
>
> > [...] I'll update the ARI documentation to mention xsnprintf
> > as well - the xstrprintf suggestion really put me in target-lock mode,
> > and I failed to think beyond it...
>
> This is what I checked in. Incidently, I noticed a typo, which
> I also fixed (this is the second patch).
Thanks for this ARI enhancement,
I did notice once that static buffers should use
xsnprintf function instead of xstrprintf that allocate a
buffer using global memory, but forgot to change ARI doc
for this rule...
I hope this will facilitate reduction of the number of
occurrences of this warning:
Currently, "Don't use sprintf" rule is found
184 times ...
So please don't hesitate to fix those issues
under the OBVIOUS rule!
Pierre Muller
as ARI maintainer