Commit 0bc9c252 by Richard Stallman

(check_format): For scan of "%["...

(check_format): For scan of "%[", skip over scan set
til closing ']' to avoid processing it as ordinary format characters.

From-SVN: r5160
parent 34a25822
...@@ -1716,6 +1716,21 @@ check_format (info, params) ...@@ -1716,6 +1716,21 @@ check_format (info, params)
format_char); format_char);
warning (message); warning (message);
} }
if (info->is_scan && format_char == '[')
{
/* Skip over scan set, in case it happens to have '%' in it. */
if (*format_chars == '^')
++format_chars;
/* Find closing bracket; if one is hit immediately, then
it's part of the scan set rather than a terminator. */
if (*format_chars == ']')
++format_chars;
while (*format_chars && *format_chars != ']')
++format_chars;
if (*format_chars != ']')
/* The end of the format string was reached. */
warning ("no closing `]' for `%%[' format");
}
if (suppressed) if (suppressed)
{ {
if (index (fci->flag_chars, '*') == 0) if (index (fci->flag_chars, '*') == 0)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment