Re: [PATCH] c-format: -Wformat-diag fix [PR93641]

2020-02-10 Thread Marek Polacek
On Mon, Feb 10, 2020 at 03:25:43PM +0100, Jakub Jelinek wrote: > Hi! > > The last argument to strncasecmp is incorrect, so it matched even when > can%' wasn't followed by t. Also, the !ISALPHA (format_chars[1]) test > looks pointless, format_chars[1] must be ' if strncasecmp succeeded and > so wi

[PATCH] c-format: -Wformat-diag fix [PR93641]

2020-02-10 Thread Jakub Jelinek
Hi! The last argument to strncasecmp is incorrect, so it matched even when can%' wasn't followed by t. Also, the !ISALPHA (format_chars[1]) test looks pointless, format_chars[1] must be ' if strncasecmp succeeded and so will never be ISALPHA. Fixed thusly, bootstrapped/regtested on x86_64-linux