aboutsummaryrefslogtreecommitdiff
path: root/gdb/gdbsupport
diff options
context:
space:
mode:
authorTom Tromey <tromey@adacore.com>2019-12-05 08:15:51 -0700
committerTom Tromey <tromey@adacore.com>2019-12-13 15:15:31 -0700
commit3cb5a3a16af2cae1a5059b7571c514b3fa575df9 (patch)
tree40c1c42a3eb1b8567be1367f2dc3c0e05b6ccd7e /gdb/gdbsupport
parentc6cbf900d42cf8f2ebbcf33d799c52c54b9aa9f0 (diff)
downloadgdb-3cb5a3a16af2cae1a5059b7571c514b3fa575df9.zip
gdb-3cb5a3a16af2cae1a5059b7571c514b3fa575df9.tar.gz
gdb-3cb5a3a16af2cae1a5059b7571c514b3fa575df9.tar.bz2
Suppress ARI warnings for vsprintf
A few spots can validly call vsprintf; this adds ARI markers to suppress warnings at these places. gdb/ChangeLog 2019-12-13 Tom Tromey <tromey@adacore.com> * gdbsupport/common-utils.c (string_printf, string_vprintf) (string_vappendf): Add ARI comment. Change-Id: Ia8665aa5d7b7331a3985b18626b19764a264447b
Diffstat (limited to 'gdb/gdbsupport')
-rw-r--r--gdb/gdbsupport/common-utils.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/gdb/gdbsupport/common-utils.c b/gdb/gdbsupport/common-utils.c
index d1059de..33f9bf6a 100644
--- a/gdb/gdbsupport/common-utils.c
+++ b/gdb/gdbsupport/common-utils.c
@@ -89,7 +89,7 @@ string_printf (const char* fmt, ...)
/* C++11 and later guarantee std::string uses contiguous memory and
always includes the terminating '\0'. */
va_start (vp, fmt);
- vsprintf (&str[0], fmt, vp);
+ vsprintf (&str[0], fmt, vp); /* ARI: vsprintf */
va_end (vp);
return str;
@@ -111,7 +111,7 @@ string_vprintf (const char* fmt, va_list args)
/* C++11 and later guarantee std::string uses contiguous memory and
always includes the terminating '\0'. */
- vsprintf (&str[0], fmt, args);
+ vsprintf (&str[0], fmt, args); /* ARI: vsprintf */
return str;
}
@@ -147,7 +147,7 @@ string_vappendf (std::string &str, const char *fmt, va_list args)
/* C++11 and later guarantee std::string uses contiguous memory and
always includes the terminating '\0'. */
- vsprintf (&str[curr_size], fmt, args);
+ vsprintf (&str[curr_size], fmt, args); /* ARI: vsprintf */
}
char *