aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorMartin Sebor <msebor@redhat.com>2016-10-13 14:58:20 +0000
committerMartin Sebor <msebor@gcc.gnu.org>2016-10-13 08:58:20 -0600
commit5b1548fd79423c451b96f897701dc4aa51131b86 (patch)
tree527b32b7db3879b13e34042054b1134b47d6630d /gcc
parent0c0d2a4cf0fbad6cb92dcf666b24fde8fac8b104 (diff)
downloadgcc-5b1548fd79423c451b96f897701dc4aa51131b86.zip
gcc-5b1548fd79423c451b96f897701dc4aa51131b86.tar.gz
gcc-5b1548fd79423c451b96f897701dc4aa51131b86.tar.bz2
builtin-sprintf-warn-1.c: Cast 0 to wint_t to placate -Wformat on targets where the type is not int.
gcc/testsuite/Changelog: * gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: Cast 0 to wint_t to placate -Wformat on targets where the type is not int. From-SVN: r241123
Diffstat (limited to 'gcc')
-rw-r--r--gcc/testsuite/ChangeLog5
-rw-r--r--gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-1.c6
2 files changed, 8 insertions, 3 deletions
diff --git a/gcc/testsuite/ChangeLog b/gcc/testsuite/ChangeLog
index df9ca38..a2be1a0 100644
--- a/gcc/testsuite/ChangeLog
+++ b/gcc/testsuite/ChangeLog
@@ -1,3 +1,8 @@
+2016-10-13 Martin Sebor <msebor@redhat.com>
+
+ * gcc.dg/tree-ssa/builtin-sprintf-warn-1.c: Cast 0 to wint_t
+ to placate -Wformat on targets where the type is not int.
+
2016-10-13 David Malcolm <dmalcolm@redhat.com>
* gcc.target/i386/vararg-loc.c: Update for quoting of xloc.file
diff --git a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-1.c b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-1.c
index d375a5e..4616e0f 100644
--- a/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-1.c
+++ b/gcc/testsuite/gcc.dg/tree-ssa/builtin-sprintf-warn-1.c
@@ -1293,9 +1293,9 @@ void test_snprintf_chk_c_const (void)
T (3, "%c_%c", '1', '2'); /* { dg-warning "output truncated" } */
/* Wide characters. */
- T (0, "%lc", 0);
- T (1, "%lc", 0);
- T (2, "%lc", 0);
+ T (0, "%lc", (wint_t)0);
+ T (1, "%lc", (wint_t)0);
+ T (2, "%lc", (wint_t)0);
/* The following could result in as few as a single byte and in as many
as MB_CUR_MAX, but since the MB_CUR_MAX value is a runtime property