diff mbox

Fix warning in stdio-common/tst-printf-round.c

Message ID alpine.DEB.2.10.1411252309580.17237@digraph.polyomino.org.uk
State New
Headers show

Commit Message

Joseph Myers Nov. 25, 2014, 11:10 p.m. UTC
This patch fixes warnings of the form "tst-printf-round.c:202:17:
warning: passing argument 3 of 'test_hex_in_one_mode' discards 'const'
qualifier from pointer target type", by adding an extra const to that
argument (so that after array-to-pointer conversion it's const char
*const *).

Tested for x86_64.

2014-11-25  Joseph Myers  <joseph@codesourcery.com>

	* stdio-common/tst-printf-round.c (test_hex_in_one_mode): Make
	third argument const.

Comments

Roland McGrath Nov. 25, 2014, 11:22 p.m. UTC | #1
OK
diff mbox

Patch

diff --git a/stdio-common/tst-printf-round.c b/stdio-common/tst-printf-round.c
index b76360f..5035dda 100644
--- a/stdio-common/tst-printf-round.c
+++ b/stdio-common/tst-printf-round.c
@@ -136,7 +136,7 @@  static const struct hex_test hex_tests[] =
   };
 
 static int
-test_hex_in_one_mode (double d, const char *fmt, const char *expected[4],
+test_hex_in_one_mode (double d, const char *fmt, const char *const expected[4],
 		      const char *mode_name)
 {
   char buf[100];