diff --git a/ChangeLog b/ChangeLog index 0c6b43ebc0..83a28dbb2f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2018-11-01 Joseph Myers + * posix/bug-regex22.c (main): Use puts with distinct error + messages for unexpected success of re_compile_pattern, not printf + with NULL argument to %s. + * stdio-common/bug22.c: Include . (do_test): Disable -Wformat-overflow= warnings around fprintf calls outputting more than INT_MAX characters. diff --git a/posix/bug-regex22.c b/posix/bug-regex22.c index 2c561d8e43..73b222cbff 100644 --- a/posix/bug-regex22.c +++ b/posix/bug-regex22.c @@ -99,8 +99,8 @@ main (void) s = re_compile_pattern ("[[:DIGIT:]]", 11, &re); if (s == NULL) { - printf ("compilation of \"[[:DIGIT:]]\" pattern unexpectedly succeeded: %s\n", - s); + puts ("compilation of \"[[:DIGIT:]]\" pattern unexpectedly succeeded: " + "length 11"); result = 1; } @@ -109,8 +109,8 @@ main (void) s = re_compile_pattern ("[[:DIGIT:]]", 2, &re); if (s == NULL) { - printf ("compilation of \"[[:DIGIT:]]\" pattern unexpectedly succeeded: %s\n", - s); + puts ("compilation of \"[[:DIGIT:]]\" pattern unexpectedly succeeded: " + "length 2"); result = 1; }