Suppress ARI warnings for vsprintf
authorTom Tromey <tromey@adacore.com>
Thu, 5 Dec 2019 15:15:51 +0000 (08:15 -0700)
committerTom Tromey <tromey@adacore.com>
Fri, 13 Dec 2019 22:15:31 +0000 (15:15 -0700)
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

gdb/ChangeLog
gdb/gdbsupport/common-utils.c

index d107b6cea7fca35696fa2e16f759ccbe14e63a56..0e1f484e51d50215b5fedc36c71fc4825a280ae3 100644 (file)
@@ -1,3 +1,8 @@
+2019-12-13  Tom Tromey  <tromey@adacore.com>
+
+       * gdbsupport/common-utils.c (string_printf, string_vprintf)
+       (string_vappendf): Add ARI comment.
+
 2019-12-13  Tom Tromey  <tromey@adacore.com>
 
        * contrib/ari/gdb_ari.sh: Remove "fix" call for
index d1059de0b33f0d6c3364047e53bb3c9e259eafb0..33f9bf6a570036de2701dcd8c0cfa1613339d381 100644 (file)
@@ -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 *
This page took 0.03095 seconds and 4 git commands to generate.