From: Joel Brobecker <brobecker@adacore.com>
To: gdb-patches@sourceware.org
Subject: [ARI/commit] enhance suggestion in "sprintf" rule (was: "Re: [commit] Re: New ARI warning Sat May 28 01:53:47 UTC 2011")
Date: Mon, 30 May 2011 19:59:00 -0000 [thread overview]
Message-ID: <20110530195910.GF2620@adacore.com> (raw)
In-Reply-To: <20110530195019.GE2620@adacore.com>
[-- Attachment #1: Type: text/plain, Size: 289 bytes --]
> [...] 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).
--
Joel
[-- Attachment #2: ari-sprintf.diff --]
[-- Type: text/x-diff, Size: 619 bytes --]
Index: gdb_ari.sh
===================================================================
RCS file: /cvs/gdbadmin/ss/gdb_ari.sh,v
retrieving revision 1.108
retrieving revision 1.109
diff -u -p -r1.108 -r1.109
--- gdb_ari.sh 21 Mar 2011 23:04:02 -0000 1.108
+++ gdb_ari.sh 30 May 2011 19:53:25 -0000 1.109
@@ -1068,7 +1068,7 @@ Replace set_register_cached() with nothi
# or safely allocate a fresh buffer.
BEGIN { doc["sprintf"] = "\
-Do not use sprintf, instead use xstrprintf"
+Do not use sprintf, instead use xsnprintf or xstrprintf"
category["sprintf"] = ari_code
}
/(^|[^_[:alnum:]])sprintf[[:space:]]*\(/ {
[-- Attachment #3: ari-vsprint.diff --]
[-- Type: text/x-diff, Size: 803 bytes --]
Index: gdb_ari.sh
===================================================================
RCS file: /cvs/gdbadmin/ss/gdb_ari.sh,v
retrieving revision 1.109
retrieving revision 1.110
diff -u -p -r1.109 -r1.110
--- gdb_ari.sh 30 May 2011 19:53:25 -0000 1.109
+++ gdb_ari.sh 30 May 2011 19:55:37 -0000 1.110
@@ -1075,12 +1075,12 @@ Do not use sprintf, instead use xsnprint
fail("sprintf")
}
-BEGIN { doc["vsprint"] = "\
-Do not use vsprint(), instead use xstrvprintf"
- category["vsprint"] = ari_regression
+BEGIN { doc["vsprintf"] = "\
+Do not use vsprintf(), instead use xstrvprintf"
+ category["vsprintf"] = ari_regression
}
-/(^|[^_[:alnum:]])vsprint[[:space:]]*\(/ {
- fail("vsprint")
+/(^|[^_[:alnum:]])vsprintf[[:space:]]*\(/ {
+ fail("vsprintf")
}
BEGIN { doc["asprintf"] = "\
next prev parent reply other threads:[~2011-05-30 19:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-05-28 1:54 New ARI warning Sat May 28 01:53:47 UTC 2011 GDB Administrator
2011-05-30 18:35 ` Jan Kratochvil
2011-05-30 18:59 ` Joel Brobecker
2011-05-30 19:29 ` [commit] " Jan Kratochvil
2011-05-30 19:38 ` Mark Kettenis
2011-05-30 19:50 ` Joel Brobecker
2011-05-30 19:59 ` Joel Brobecker [this message]
2011-05-31 7:58 ` [ARI/commit] enhance suggestion in "sprintf" rule (was: "Re: [commit] Re: New ARI warning Sat May 28 01:53:47 UTC 2011") Pierre Muller
2011-05-30 19:16 ` New ARI warning Sat May 28 01:53:47 UTC 2011 Mark Kettenis
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20110530195910.GF2620@adacore.com \
--to=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox